Also couple of comments on your code:
UPDATE: integral is absolutely right, and I'm in a case of do what I mean not what I say :(. Updated comment to correct.use strict; package SAR; &get_args (@ARGV); #Ok here you're passing a copy #of @ARGV into get_args's @_. #BTW your don't need & the #trailing ()'s make strict happy sub get_args { my @help = <DATA>; #Why read this now #You don't know if you need #it yet. ($ARGV[0] eq "/?") && (die @help); #Ok you passed the contents of #@ARGV into your sub in @_ but #you ignore it and read the #global @ARGV directly. #copy @_ that way you don't have #to worry about modifing the #global @ARGV. #my @array = @_; #die @help if ($array[0] eq "/?") }
| Mynd you, mønk bites Kan be pretti nasti... |
In reply to Re: perlapp, die, and __DATA__
by grep
in thread perlapp, die, and __DATA__
by joker0927
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |