Steve Bertrand wrote:
Can someone explain to me how I can fix this up to achieve my desired results?

my $time = (split (/:/, (grep (/^info/, @contents))))[0];

A sample snip of data:

this382:3828
info447:4729
that274:9294

...and I just want the $time to become info447.

    my $time;
    ($time) = /^(info\d+)/ and last for @contents;

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to