jclaudio has asked for the wisdom of the Perl Monks concerning the following question:
when i do a print $delimiter, it prints the right thing : | (for example ) and when I do : @array = split ( /\|/, $line ); it works well ! but 'cause the delimiter can be different : or ; I have to pass It to my script as a parameter Has anybody an idea about the split syntax , in that case ? I've been searchin' in the perl cookbook, but nothing helps I need help ! thanks@array = split ( /$delimiter/, $line ); @array = split ( /"$delimiter"/, $line ); @array = split ( $delimiter, $line ); @array = split ( '$delimiter', $line ); @array = split ( /\$delimiter/, $line );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: problem with split function
by Limbic~Region (Chancellor) on Oct 20, 2003 at 16:52 UTC | |
by jclaudio (Initiate) on Oct 20, 2003 at 17:03 UTC | |
by diotalevi (Canon) on Oct 20, 2003 at 19:23 UTC | |
|
Re: problem with split function
by etcshadow (Priest) on Oct 20, 2003 at 17:01 UTC | |
|
Re: problem with split function
by tcf22 (Priest) on Oct 20, 2003 at 17:05 UTC | |
|
Re: problem with split function
by graff (Chancellor) on Oct 21, 2003 at 04:30 UTC |