- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Perl is very difficult to use !
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2008 08:24 PM
08-27-2008 08:24 PM
Perl is very difficult to use !
I need to write a crontab script in my HP-UX system in order to do SAP re-index regularly :
#!/opt/perl/bin/perl
#
# Use SAP BR*TOOLS to reorganize indexes in SAP database
#
/oracle/DEV/920_64/bin/sqlplus sapdev/xxx \@/oracle/DEV/genrebidx2.sql
Case 1
$cmd="ORACLE_HOME=/oracle/DEV/920_64";
$result=system($cmd);
Error 6 initializing SQL*Plus
Message file sp1
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
Case 2
export ORACLE_HOME=/oracle/DEV/920_64;
Bareword found where operator expected at /oracle/DEV/idx_rebuild.sh line 7, near "/oracle/DEV"
(Missing operator before DEV?)
syntax error at /oracle/DEV/idx_rebuild.sh line 7, near "/oracle/DEV"
Execution of /oracle/DEV/idx_rebuild.sh aborted due to compilation errors.
Case 3
export ORACLE_HOME="/oracle/DEV/920_64";
Can't locate object method "export" via package "ORACLE_HOME" (perhaps you forgot to load "ORACLE_HOME"?) at /oracle/DEV/idx_rebuild.sh line 7.
Any ideals ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2008 09:17 PM
08-27-2008 09:17 PM
Re: Perl is very difficult to use !
http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1263116
Useful hints are already there (e.g. source a file ...)
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2008 10:49 PM
08-28-2008 10:49 PM
Re: Perl is very difficult to use !
use perl if you need to shift/sort/transform/distilate/etc. data from huge logfile/cmd output/etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2008 05:59 AM
08-29-2008 05:59 AM
Re: Perl is very difficult to use !
Perl will become very helpful if/when you add the 'strict' and 'warnings' pragmas to your Perl scripts!
#!/opt/perl/bin/perl
use strict;
use warnings;
So many trivial errors are caught this way...
As Torsten said, you need to revisit your original thread, of which this is really just a continuation! The verb 'export' as the shell uses it doesn't apply to Perl. The 'ENV' hash is where environmental variables are stored and imported.
In UNIX, a child process alter its environment but it cannot alter its parent's environment.
It benefits everyone (!) if you do not open new threads for the same question. You should also read:
http://forums12.itrc.hp.com/service/forums/helptips.do?#28
Regards!
...JRF...
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2008 06:31 PM
08-31-2008 06:31 PM
Re: Perl is very difficult to use !
I already fixed the problem by myself, used $ENV.