in reply to print and extract the line
From the lines and expected outputs you have shown it looks like you want a character range from within a string. You can use substr for this. Note that Perl uses zero-based offsets into strings.
$ perl -E ' > $line = q{abcdefghijklmno}; > say $line; > say substr $line, 0, 3; > say substr $line, 5, 6; > say substr $line, 13;' abcdefghijklmno abc fghijk no $
I hope this is helpful.
Cheers,
JohnGG
|
|---|