Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Keep It Simple, Stupid
 
PerlMonks  

Re: new to perl, need some help

by kcott (Abbot)
on Oct 02, 2012 at 06:48 UTC ( #996813=note: print w/ replies, xml ) Need Help??


in reply to new to perl, need some help

G'day kingpin007,

Welcome to the monastery.

I see NetWallah++ has provided the answer to your posted question. Here's a couple of additional points.

Your shebang line needs to start with #!, not !#. I suspect this is simply a typo but if you run this code you'll get the (possibly rather cryptic) message: "Can't modify not in scalar assignment".

When you have sequences of numbers, you can use the range operator (..). Instead of qw(1 2 3 4 5 10 11 12 13 14), you can just type (1 .. 5, 10 .. 14). This is described in perlop - Range Operators.

-- Ken


Comment on Re: new to perl, need some help
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://996813]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (9)
As of 2014-04-20 22:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (488 votes), past polls