Mailing List Archive

problem with argument passing
The following problem was encountered in the simple client example in the
perlipc man page. Namely, only one of three supposedly equivalent ways of
getting the command line arguments works.

The version of perl used was:
This is perl, version 5.001

Unofficial patchlevel 1m.
on a Sun running SunOS 5.4 Generic November 1994

($them,$port) = @ARGV;
the method in the man page example doesn't; neither does

$them=$ARGV[0];
$port=$ARGV[1];

They generate:
Can't open localhost: No such file or directory
Can't open 25: No such file or directory

if you try client localhost 25

However, the shift method does the right thing:
$them=shift;
$port=shift;

I would appreciate any feedback on this you could give me.

Rich Haller