$title does not exist outside of the sub.
You get warnings about this if you Use strict warnings and diagnostics or die
And off to read perlintro/perlsub (or Tutorials) you go
#!/usr/bin/perl -- use strict; use warnings; sub many { return @_ } my $one = many( 6 .. 12); my @all = many( 16 .. 18 ); my (undef, $second) = many( 26 .. 28 ); print " one $one all @all some $second "; __END__ one 7 all 16 17 18 some 27
In reply to Re: Functions (Return V Print)
by Anonymous Monk
in thread Functions (Return V Print)
by packetstormer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |