Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: What the heck does this mean?

by japhy (Canon)
on Mar 13, 2001 at 01:28 UTC ( #63968=note: print w/ replies, xml ) Need Help??


in reply to What the heck does this mean?

Running it through the deparser, I get:
if (/^coclli=(.*)/ and $coclli eq '') { $coclli = $1; }
It's using a regex to assign to $coclli if the variable isn't already assigned.

The deparser is available in Perl 5.005 and up, as:

japhy% perl -MO=Deparse program_name


japhy -- Perl and Regex Hacker

Replies are listed 'Best First'.
Re: Re: What the heck does this mean?
by Falkkin (Chaplain) on Mar 13, 2001 at 01:33 UTC
    Basically, in English, this code reduces to:

    If the string $_ starts with "coclli=", and then "some characters", and the variable $coclli is equal to the empty string, set the variable $coclli to the (any-amount-of-characters).

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2016-08-28 11:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (392 votes). Check out past polls.