in reply to Passing Empty/ Undefined values to a subroutine
C.
Test:
Oops, browser didnt refresh properly, honest!perl -le'$ret_val = my_sub(1, "", 2, "", "", 3); sub my_sub{$arg1 = sh +ift;$undef1 = shift;$arg2 = shift;$undef2 = shift;$undef3 = shift;$ar +g3 = shift; print "Arg1:", $arg1, " Undef1:", $undef1, " Arg2:", $arg +2, " Undef2:", $undef2; }' Prints: Arg1:1 Undef1: Arg2:2 Undef2:
|
|---|