Re: Array element split, with grep
- From: iaccounts@xxxxxxxxxx (Steve Bertrand)
- Date: Wed, 30 Apr 2008 15:43:54 -0400
Steve Bertrand wrote:
Hi all,
Can someone explain to me how I can fix this up to achieve my desired results?
my $time = (split (/:/, (grep (/^info/, @contents))))[0];
I figured it out :)
my $time = (split (/:/, (grep (/^info/, @contents))[0]))[0];
I neglected to realize that the result from grep was in scalar context until I specified it as an array.
Steve
.
- Follow-Ups:
- Re: Array element split, with grep
- From: Uri Guttman
- Re: Array element split, with grep
- References:
- Array element split, with grep
- From: Steve Bertrand
- Array element split, with grep
- Prev by Date: Array element split, with grep
- Next by Date: Re: Array element split, with grep
- Previous by thread: Array element split, with grep
- Next by thread: Re: Array element split, with grep
- Index(es):
Relevant Pages
|
|