Re: Help: Process data
- From: Tim Greer <tim@xxxxxxxxxxxxx>
- Date: Sun, 30 Nov 2008 22:22:46 -0800
Amy Lee wrote:
I have a little problem, could you tell me why do you use such block?
my(undef, $this) = split;
The above will split (on whitespace, by default), with the $this
variable being assigned the value of 0 or 1 -- given your example (the
second field in the line, is either 1 or 0, and since the conditional
isn't checking or caring what the first field is, the first field is
just undefined and not assigned anything).
if ( $this == $value )
If the value of $this is equal to (==) $value (whatever $value you set
to), then it will...
{ push @buffer, $_ }
Push (add) $_ (the string value for that line) to the @buffer array.
--
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting. 24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!
.
- References:
- Help: Process data
- From: Amy Lee
- Re: Help: Process data
- From: Tad J McClellan
- Re: Help: Process data
- From: Amy Lee
- Help: Process data
- Prev by Date: Re: FAQ 9.4 How do I remove HTML from a string?
- Next by Date: Re: if ($line == $count++)
- Previous by thread: Re: Help: Process data
- Next by thread: Re: Help: Process data
- Index(es):
Relevant Pages
|