in reply to Spotting an empty array as argument
Well, there is of course a way of doing it, but it's not pretty...
sub brutesay{ if(@_>=1){ for(@_){print("$_\n")} }else{ ($package,$filename,$line) = caller; open $fh,$filename; for $i(0..$line-2){<$fh>} if(<$fh>=~/brutesay *(\(\))? *;/){print "$_\n";} } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Spotting an empty array as argument
by haukex (Archbishop) on Mar 26, 2021 at 22:14 UTC | |
|
Re^2: Spotting an empty array as argument
by LanX (Saint) on Mar 26, 2021 at 18:54 UTC |