Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: newbie need help with a simple code

by perlmonk007 (Novice)
on Mar 05, 2013 at 04:46 UTC ( #1021744=note: print w/ replies, xml ) Need Help??


in reply to Re: newbie need help with a simple code
in thread newbie need help with a simple code

thank you so much for the prompt reply, could you please tell me what this line does? $selected = $1 . " | " . $2 . " | " . $3 . " | " . $4. "


Comment on Re^2: newbie need help with a simple code
Re^3: newbie need help with a simple code
by kielstirling (Scribe) on Mar 05, 2013 at 04:58 UTC
    This is using the regex captures to create a string. see perldoc perlre
      Im sorry, i meant are the regex automatically captured to the scalars, if not what do i need to do to capture them into $1, $2 etc
        $1, $2, $3 and so on are what Perl populates captures to. However, some of us use a syntax that allows for named captures. If you read the man page for perlre all will become clear.
      also the space between the characters is variable, it is not just one space, the file is such, could you tell me a regex for that please
        \s # one whitespace character \s+ # one or more whitespace characters \s* # zero or more whitespace characters \s{5} # exactly five whitespace characters \s{3,5} # between 3 and 5 whitespace characters
        package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
        That's a bit of information that should have been visible in your sample data.

        If you didn't program your executable by toggling in binary, it wasn't really programming!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2014-12-21 17:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (106 votes), past polls