Hi there,
how do i pass arguments with spaces in it.
exaple if i pass fun("abc is not bcd");
@ARGV would store this as 4 words. how do i retrieve it as $var = "abc is
not bcd";
thanks!!
QUOTE |
Hi there, how do i pass arguments with spaces in it. exaple if i pass fun("abc is not bcd"); |
QUOTE |
@ARGV |
QUOTE |
would store this as 4 words. how do i retrieve it as $var = "abc is not bcd"; thanks!! |
QUOTE |
lohit am Montag, 4. Juli 2005 09.17: Hi there, how do i pass arguments with spaces in it. exaple if i pass fun("abc is not bcd"); indicates that you pass the string to a _subroutine_ @ARGV is normally used to get arguments to the _script_ would store this as 4 words. how do i retrieve it as $var = "abc is not bcd"; thanks!! Could you provide some code, and how you invoke it? joe -- To unsubscribe, e-mail: [Email Removed] For additional commands, e-mail: [Email Removed] <http://learn.perl.org/> <http://learn.perl.org/first-response |
QUOTE |
lets assume I call the function as show below func("arg1","arg2","this is arg 3", "this is arg 4"); now inside func function how do I retrieve my arguments sub func() { foreach $arg in (@ARGV) { print "$argn"; } } this would print arg1 arg2 this is arg3 this is arg4 |