I am looking for some suggestions on any advanced functions Perl might
have that i might be missing.

Basically, I have an array with column widths. Next I have a string. I
would like to extract the number of characters based on the column-
widths in the array. I have already tried using substr but is there
any other way of extracting?

eg:

@col_width = (4,2,17);
my $str = 'Perl is amazing language';

I'd like a one-line command (if possible) to store 'Perl' in $a, 'is'
in $b & 'amazing language' in $c.

TIA,
-sanju


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to