Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Why use strict is good, and barewords are bad

by TedPride (Priest)
on Apr 22, 2005 at 10:09 UTC ( #450336=note: print w/replies, xml ) Need Help??


in reply to Why use strict is good, and barewords are bad

oct is a reserved word. I notice that the following works fine, however:
@months = qw/jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec/;
I always use this format or enclose the text inside quote marks.

Replies are listed 'Best First'.
Re^2: Why use strict is good, and barewords are bad
by cog (Parson) on Apr 22, 2005 at 10:18 UTC
    Of course it does. You're quoting a single word (which happens to have 47 chars :-)

    @months is ending up with one single element O:-)

Re^2: Why use strict is good, and barewords are bad
by bart (Canon) on Apr 22, 2005 at 17:27 UTC
    You're not running this with warnings enabled, I'm sure.

    And qw is an addition from somewhere in Perl5's history.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://450336]
help
Chatterbox?
[Corion]: ambrus: Details ;)
[ambrus]: Like <c>{ package AnyEvent::Impl:: Prima; use Prima; sub io{ my($s,%r)=@_; Prima::File->new( file=>$r{fh},mask =>("w"eq$r{poll}? fe::Write():fe:: Read())|fe:: Exception,onRead =>$r{cb},onWrite =>$r{cb}, onException=>$r{cb }) } sub timer { ... } push @AnyEvent::REGI
[ambrus]: argh, too long, let me try on scratchpad
[Corion]: . o O ( I seem to have improved my skills of getting other people to write code for me )

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (10)
As of 2016-12-08 12:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (141 votes). Check out past polls.