in reply to pattern matching question
use strict; my @pathandfile = qw(c:\dir1/dir2/file1.txt c:\dir1/dir3/file2); for (@pathandfile) { $_ =~ /(.*)(\\|\/)(.*)$/; print "PATH: $1 - FILE: $3\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: pattern matching question
by smokemachine (Hermit) on Dec 28, 2005 at 22:46 UTC |