in reply to Invalid argument
Note what happens when you do:
print "Debug: Arguments are $_[0] and $_[1]\n";
Read about chop and chomp for more information on how to remove newlines.
Here's a better implementation of what you're trying to do (note that chomp only removes the last character if it's a newline):
chomp(my $arg1 = shift || <>); chomp(my $arg2 = shift || <>);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Invalid argument
by Andrew_Levenson (Hermit) on Dec 01, 2006 at 20:21 UTC | |
by liverpole (Monsignor) on Dec 01, 2006 at 20:30 UTC | |
by grep (Monsignor) on Dec 01, 2006 at 20:27 UTC |