Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: Sorting file rows and copy them in an array

by choroba (Cardinal)
on Dec 11, 2014 at 16:00 UTC ( [id://1110059]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Sorting file rows and copy them in an array
in thread Sorting file rows and copy them in an array

  1. /g means "global". See perlop as already hinted.
    The /g modifier specifies global pattern matching—that is, matching as many times as possible within the string. How it behaves depends on the context. In list context, it returns a list of the substrings matched by any capturing parentheses in the regular expression. If there are no parentheses, it returns a list of all the matched strings, as if there were parentheses around the whole pattern.
  2. (...)[0] returns the first (zeroth) element of the list. Therefore, the construct enforces list context on the contents of the parentheses.
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2024-04-24 23:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found