- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: using <STDIN> in PERL
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
03-17-2005 04:35 AM
03-17-2005 04:35 AM
using <STDIN> in PERL
However, I need to call the PERL routine from a DCL procedure...in this situation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2005 05:11 AM
03-17-2005 05:11 AM
Re: using <STDIN> in PERL
Hmmm, works fine for me by doing nothing special.
For example a file tmp.com containing:
$ create tmp.pl
$deck
$param=shift @ARGV;
while (
print "hello : $param : ".$_;
}
$eod
$ perl tmp.pl xyz
aap
noot
mies
$delete tmp.pl.
$exit
$ @tmp
hello : xyz : aap
hello : xyz : noot
hello : xyz : mies
Now if you wanted the input to come from the terminal that started the command file, then you have to tell DCL that with:
$define/user sys$input sys$command
This is NOT speecific to perl, but standard practice for any DCL command file.
The whole solution then becomes:
$ type tmp.com
$ create tmp.pl
$deck
$param=shift @ARGV;
while (
print "hello : $param : ".$_;
}
$eod
$define/user sys$input sys$command
$perl tmp.pl xyz
$delete tmp.pl.
$exit
And runs as:
$ @tmp
aap
hello : xyz : aap
noot
hello : xyz : noot
mies
hello : xyz : mies
$
hth,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2005 05:13 AM
03-17-2005 05:13 AM
Re: using <STDIN> in PERL
Already tried
$ DEFINE SYS$INPUT SYS$COMMAND
?
Just meaning, equate the SYS$INPUT (which I guess would be called stdin in the *IXian parlance used by perl) to SYS$COMMAND (the master command level; in interactive sessions equated to the keyboard).
For single-image activities this can be defined /USER_MODE ; if not, then do not forget to DEASSIGN !!
hth
Proost.
Have one on me.
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2005 05:23 AM
03-17-2005 05:23 AM
Re: using <STDIN> in PERL
obviously you were helped well in your question about C header files.
Maybe you should take the time to thank those who helped by assigning some points.
For the "WHY?" and "HOW?", please see:
http://forums1.itrc.hp.com/service/forums/helptips.do?#28
PS. you will have to re-open the thread before you can give points. Afterwards you can close it again.
Proost.
Have one on me.
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2005 07:30 AM
03-17-2005 07:30 AM
Re: using <STDIN> in PERL
Barry