in reply to get substring when you know START and END???
First, read the perl docs (try perldoc -f substr). You would use substr. In your case, the code would look like:
use strict; use warnings; # always a good idea my $start = 12; my $end = 27; my $string = 'a string at least 27 characters long with any random cha +racters'; my $substring = substr($string, $start, ($end - $start));
emc
"Being forced to write comments actually improves code, because it is easier to fix a crock than to explain it. "
|
|---|