in reply to Re: Re: Re: Need RegEx assistance
in thread Need RegEx assistance

I'm using the following code compliments of jsprat:
#!C:\Perl\bin\perl -w use strict; #paragraph mode - see perlvar, input record separator $/ = ""; while(<DATA>) { my @lines = split /\n/, $_; my $file; $lines[0] =~ s/\[/\[$file / if ($file) = $lines[1] =~ /([^/]*)$'; print join ("\n", @lines), "\n\n"; } __DATA__ [get4] $uri=/LRA/RiskApplicationPage.aspx $method=GET [get5] $uri=/LRA/CSS/RiskManagement.css $method=GET
and I receive the following error:
Unmatched ( before HERE mark in regex m/( << HERE \[^/ at C:\Perl\Test +.pl line 10.