D
dcruncher4
perl -v
This is perl, v5.8.0 built for i386-linux-thread-multi
here is a simple program (script name test.pl)
#! /usr/bin/perl -w
open(MSGF,"/dev/stdin") or die "ERROR\n" ;
while ( <MSGF> ) {
print $_ ;
}
close(MSGF);
I want to call it either of the two ways
test.pl < a_file
cat a_file | test.pl
On Solaris 5.10 both method works fine.
On Linux is 2.4.21-52.ELsmp #1 SMP i686 i686 i386 GNU/Linux
It works the first method.
But the second method fails. It dies with "ERROR".
On AIX 3 5 00CFADDC4C00 both methods are failing.
What can be the reason? I am a perl programmer and I don't know
much about Linux or AIX internals.
Is there a better way to do the task in Perl or do I have to write
OS specific code (I am open to that).
Thanks.
This is perl, v5.8.0 built for i386-linux-thread-multi
here is a simple program (script name test.pl)
#! /usr/bin/perl -w
open(MSGF,"/dev/stdin") or die "ERROR\n" ;
while ( <MSGF> ) {
print $_ ;
}
close(MSGF);
I want to call it either of the two ways
test.pl < a_file
cat a_file | test.pl
On Solaris 5.10 both method works fine.
On Linux is 2.4.21-52.ELsmp #1 SMP i686 i686 i386 GNU/Linux
It works the first method.
But the second method fails. It dies with "ERROR".
On AIX 3 5 00CFADDC4C00 both methods are failing.
What can be the reason? I am a perl programmer and I don't know
much about Linux or AIX internals.
Is there a better way to do the task in Perl or do I have to write
OS specific code (I am open to that).
Thanks.