Just to pound the point completely into the ground:
>perl -wMstrict -le "F('success'); ;; sub F { my $scalar_context = @_; my ( $list_context ) = @_; ;; print qq{in scalar context: '$scalar_context'}; print qq{in list context: '$list_context'}; } " in scalar context: '1' in list context: 'success'
In reply to Re^3: passing variables to a subroutine
by AnomalousMonk
in thread passing variables to a subroutine
by AWallBuilder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |