use strict; use warnings; while(<DATA>) { my $line = $_; if($line =~ m/<.*>([^>]+)<.*>/g) { my $new = substr($line,0,10); print "THE NEW LINE is : $new\n"; print "capture only : $1\n"; } } __DATA__ <head><to>tove</to></head>
In reply to Re: use of substr() with file
by umasuresh
in thread use of substr() with file
by satishchandra
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |