Kashif Salman wrote:

How can I capture "Start" as well? putting brackets around it like so
doesn't work:

/^(Start)/ && <> =~ /^(\d+)\/(\d+)\/(\d+)/ && print "$1=> 20$4-$2-$3";

I know it seems pointless to capture start but it doesn't always say "Start"
so I want to capture it. for simplicity lets keep it "Start" and try to
capture it.

if ( /^(Start)/ ) {
    my $start = $1;
    if ( <> =~ /^(\d+)\/(\d+)\/(\d+)/ ) {
        print "$start=> 20$4-$2-$3";
        }
    }



John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall

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


Reply via email to