
tej.87g
Novice
Oct 13, 2010, 11:40 PM
Post #2 of 3
(4581 views)
|
Re: [perlnewer] split function
[In reply to]
|
Can't Post
|
|
Try this, Probably this may help you.. #usr/bin/perl my $file="871066-871069.doc"; my $file1; my $file2; if ($file=~m{(\d+)\-(\d+\.doc)}) { $file1=$1.".doc"; $file2=$2; } print "$file1\n$file2\n";
|