
Karazam
User
Jan 4, 2011, 1:42 AM
Post #5 of 5
(466 views)
|
What the code does is this. Imagine you call the script like so:
somescript.pl -n file.txt The program now shifts the first argument (-n) into $input. It then goes on to check if $input is defined and is "-n". If that is the case it sets $numeric to 1, and shifts the second argument (file.txt) into $input, which will now have the value "file.txt". The difference between this call and the call will be that $numeric is set to 1, which I guess is meant to change some behavior later on in the program. I hope this clarifies things.
|