Your skill will accomplish what the force of many cannot |
|
PerlMonks |
passing arguments to subroutineby c (Hermit) |
on Jul 23, 2001 at 21:58 UTC ( [id://99103]=perlquestion: print w/replies, xml ) | Need Help?? |
c has asked for the wisdom of the Perl Monks concerning the following question:
i am in need of a head check. mine hurts and i am afraid my
code is the cause. i am trying to pass an argument to a subroutine i have built that generates a .htaccess file. my question is whether or not i am calling the right variable as it is passed to my sub.
my biggest concern is that the $fqdn is being set to the $i value without any gotchas, e.g. do i need to chomp this bad boy to create the file or any other ghosts i may not be seeing. also, i am using shift to pull the value out of @_ in my subroutine. is this the right way to do this? granted in this example $i is a single value rather than multiple strings being passed to the sub-routine, but i am sure i am going to make use of this again in the near future. humbly -c
Back to
Seekers of Perl Wisdom
|
|