Hi I have a txt file that contains the following info:
Text start here -------------------------------- $/Dev/something/something.com/blah1: default.asp user Exc 26/07/04 1:42p [TEST-DEV]F:\content\blah\wwwroot\blah1 $/Dev/something/something.com/something: test.asp user Exc 26/07/04 3:09p [TEST-DEV] F:\content\blah\wwwroot\something $/Dev/something/something.com/blah: Blah.inc user Exc 23/07/04 11:13a [BAGEL-DEV] F:\content\blah\wwwroot\blah $/Dev/something/something.com/blah/blah/20GB: Something-were.htm user Exc 23/07/04 11:24a [TEST-DEV]F:\content\blah\wwwroot\blah\blah\20GB Text end here -------------------------------- The result I am trying to get is the this: $/Dev/something/something.com/blah1/default.asp $/Dev/something/something.com/something/test.asp $/Dev/something/something.com/blah/Blah.inc $/Dev/something/something.com/blah/blah/20GB/Something-were.htm I been trying to various combinations of the below. If i could work out how to match the file name on the line below. Perl code start -- use strict; my $file = shift; my $line; open(IN, "<$file") || die "$!"; while($line =<IN>) { $line =~ /(\$\S+):.(\S+)/is; print "match1: $1; match2: $2 \n"; } Perl code end -- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>