Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Re: NEWBIE Brain Teaser #2, by nysus

by artist (Parson)
on Apr 16, 2001 at 16:07 UTC ( #72808=note: print w/replies, xml ) Need Help??


in reply to Re: NEWBIE Brain Teaser #2, by nysus
in thread NEWBIE Brain Teaser #2, by nysus

$_ = qw(nothing nothing)
Translates to:
1. Under 5.005
@_ = qw(nothing nothing)
2. Under 5.6
No effect on @_;
Resulting
call for &subroutine
1. Under 5.005
prints "..nothing..nothing"
2. Under 5.6
prints "..alpha ..omega"

Try:

print qw(1 2 3)[0]
under 5.005 and 5.6.

Replies are listed 'Best First'.
Re: Re: Re: NEWBIE Brain Teaser #2, by nysus
by merlyn (Sage) on Apr 16, 2001 at 19:35 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://72808]
help
Chatterbox?
[thezip]: What idiom should I use to determine that a directory is empty (for many directories)?
[thezip]: I suppose could check if readdir() returns other than '.' and '..', but that seems ugly.

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (11)
As of 2017-03-28 18:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (339 votes). Check out past polls.