in reply to Re: Can I tell a sub to take $_ instead of @_ (like some builtins do)
in thread Can I tell a sub to take $_ instead of @_ (like some builtins do)

About your line:
    my $parm = $_[0] || $_;
What is you call this?
test(0);
test("");
You should wait for Perl 6 and use the new operator //.
  • Comment on Re x 2: Can I tell a sub to take $_ instead of @_ (like some builtins do)

Replies are listed 'Best First'.
Re: Re x 2: Can I tell a sub to take $_ instead of @_ (like some builtins do)
by BrowserUk (Patriarch) on Aug 23, 2002 at 05:58 UTC

    <tongue-in-cheek>

    Printing a null byte to the screen isn't very useful anyway!

    It's a feature:)

    </tongue-in-cheek>

    my $parm = defined $_[0] ? $_[0] : $_;?


    What's this about a "crooked mitre"? I'm good at woodwork!