lddzjwwy has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks,
I want to realize such a function that it can cut some columns from one variable and returns them to an other variable, it also allows me to choose the columns and the separators arbitrary.
E.g. I want to extract the 2nd, 3rd and 5-7th columns from $source and save them into $dest, and the separators for the columns can be space, # or =.
Are there any easy ways to implement this function?
Thanks a lot!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl Substr
by Happy-the-monk (Canon) on Jun 18, 2013 at 15:44 UTC | |
|
Re: Perl Substr
by LanX (Saint) on Jun 18, 2013 at 16:03 UTC | |
|
Re: Perl Substr
by Eily (Monsignor) on Jun 18, 2013 at 16:02 UTC | |
|
Re: Perl Substr
by CountZero (Bishop) on Jun 18, 2013 at 16:25 UTC | |
|
Re: Perl Substr
by hbm (Hermit) on Jun 18, 2013 at 16:14 UTC |