Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I want to use split to generate the array ('a','b','c','d','')--notice the extra character at the end. Do I really have to check for the number of columns after the split and push on an extra character at the end. Is there any way to do this within split using regular expressions? Many thanks as always.$a="a,b,c,d," @col = split(",",$a);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: I cannot believe I'm asking a question about split
by Cristoforo (Curate) on Aug 08, 2012 at 22:07 UTC | |
by Anonymous Monk on Aug 08, 2012 at 22:15 UTC | |
|
Re: I cannot believe I'm asking a question about split
by eyepopslikeamosquito (Archbishop) on Aug 08, 2012 at 22:15 UTC | |
|
Re: I cannot believe I'm asking a question about split
by kcott (Archbishop) on Aug 08, 2012 at 22:15 UTC | |
|
Re: I cannot believe I'm asking a question about split
by Kenosis (Priest) on Aug 08, 2012 at 22:26 UTC |