Hi I have a piece of code, when a no is passed twice it will just print out saying the no is called twice. But unfortunately it's not working as intended. Any thoughts ? Thanks
{ my $last = 5; sub do_stuff { my $arg = @_; if ( $arg == $last ) { print "You called me twice in a row with $arg\n"; } $last = $arg; } } do_stuff($_) for 0..5;
In reply to Need help ! by lonewolf28
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |