Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: position of first matching regex

by GrandFather (Saint)
on May 18, 2014 at 10:34 UTC ( [id://1086497]=note: print w/replies, xml ) Need Help??


in reply to Re^2: position of first matching regex
in thread position of first matching regex

Why print if the match fails?

Note that my code includes strictures (use strict; use warnings;). That will warn you of such unhealthy coding practises. I strongly recommend you use strictures, especially if you are just starting out with Perl.

The () around your two assignment statements don't add any value and make understanding the intent of your code harder.

@array is not a scalar reference. It is the array.

Perl is the programming world's equivalent of English

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-25 07:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found