Quoting Jeff 'japhy' Pinyan <[EMAIL PROTECTED]>:
> O
>my @dirs = split /\//, $cd; # splitting on forward slashes
>my @dirs = split '/', $cd; # same thing, less ugly
>
>
Nice tip Jeff, thanks! :)
This email was sent from N
On Oct 5, [EMAIL PROTECTED] said:
I would like to split up a string like this
my $cd = $arguments;
@dirs = split(///,$cd); #Split $cd when there occurs a backslash
but it doesn't seem to work. I guess /// must be rewritten in some way,
but how?
'/' is a FORWARD slash. '\' is
my $cd = $arguments;
@dirs = split(/\//,$cd); #Split $cd when there occurs a backslash
Negate with \
hth.
On 10/5/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi there!
>
> I would like to split up a string like this
>
> my $cd = $arguments;
> @dirs = split(///,$cd); #Split $cd when the
Hi there!
I would like to split up a string like this
my $cd = $arguments;
@dirs = split(///,$cd); #Split $cd when there occurs a backslash
but it doesn't seem to work. I guess /// must be rewritten in some way,
but how?
/G
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For ad