CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [Stefanik] Match string in multi-line file: Edit Log



Stefanik
User

Dec 28, 2012, 2:20 AM


Views: 4542
Re: [Stefanik] Match string in multi-line file

Hi try something more to exercise.

If I have the string to extract not in the second field ($2), but in any part of the line, I'd use regular expression as indicate me:


Code
  $FileTemp =~ s/:/\n/g;  
my $value1 = $2 if $FileTemp =~ /^TRANSID,\w+/;
print $value1;



But no output is returned.

What I'm wrong?!? :(


(This post was edited by Stefanik on Dec 28, 2012, 2:40 AM)


Edit Log:
Post edited by Stefanik (User) on Dec 28, 2012, 2:40 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives