[ale] NewbieQ Perl filtering question

Mills, John M. Mills.J at ems-t.com
Fri Jun 30 08:33:34 EDT 2006


Tim -

Thanks. That looks like what I had in mind. Time to start learning Perl,
I guess.

Good weekend to all.

 - Mills 

-----Original Message-----
From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of Tim
To: ale at ale.org
Meanor
Sent: Thursday, June 29, 2006 5:39 PM
To: Atlanta Linux Enthusiasts
Subject: Re: [ale] NewbieQ Perl filtering question

This is kinda ugly, but it should work:
$string1 = string1;
$string2 = string2;
$input = "blah..blah..string1good contentstring2..garbage..garbage";

$tempstring = (split $string1, $input)[1];
$good_content = (split $string2, $tempstring)[0];

or, more compactly:

$good_content = ( split "string2", ( split "string1", input )[1] )[0];

-Tim




More information about the Ale mailing list