the last two sentences look wrong to me. tried this:There's a few things to note:D:\>perl -MData::Dumper -e "sub x{1 for 1..5};@y=x();print 'ha' if def +ined @y" ha
$ perl -MData::Dumper -e 'sub x{1 for 1..5};@y=x();print Dumper(\@y)' $VAR1 = [ '' ];
$ perl -wle 'sub x{};@y=x(); print "array" if @y' (nothing) $ perl -wle 'sub x{};%y=x();print "hash" if %y' (nothing) $ perl -wle 'sub x{1..3};@y=x(); print "array" if @y' array $ perl -wle 'sub x{a => 1};%y=x();print "hash" if %y' hash
Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!
In reply to Re^3: perlsub question..
by naikonta
in thread perlsub question..
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |