> -Original Message-
> From: Singh, Ajit p [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 03, 2004 3:11 PM
> To: Singh, Ajit p; [EMAIL PROTECTED]
> Subject: splitting with special characters
>
>
> Hello All,
>
> I am trying to split a string with the / ( forward slash) as
> the marke
I think whats happening is your printing the entire array @result_from_split...do
@result_from_split[0] and so on..
Mandar
Original message
>Date: Thu, 3 Jun 2004 08:19:45 -0500
>From: James Edward Gray II <[EMAIL PROTECTED]>
>Subject: Re: splitting with special c
Works for me
#!/usr/bin/perl
#
#
use strict;
use Data::Dumper;
my $mystring = "abcde/fghi";
my @a = split (/\//,$mystring);
print Dumper([EMAIL PROTECTED]);
__END__
OUTPUT
$VAR1 = [
'abcde',
'fghi'
];
Ram
On Thu, 2004-06-03 at 18:41, Singh, Ajit p wrote:
> Hel
Hi Singh,
Try this:
$mystring = "abcde/fghi";
@a = split (/\//, $mystring);
print "$a[0]\n";
print "$a[1]";
Regards,
Cristi Ocolisan
-Original Message-
From: Singh, Ajit p [mailto:[EMAIL PROTECTED]
Sent: 3 iunie 2004 16:11
To: Singh, Ajit p; [EMAIL PROTECTED]
Subject: splitting with
On Jun 3, 2004, at 8:11 AM, Singh, Ajit p wrote:
Hello All,
I am trying to split a string with the / ( forward slash) as the
marker.
$mystring = "abcde/fghi"
split (///,$mystring) -- gives me compile error
split (/\//,$mystring) -- gives me abcdefghi
I hope not. The second one is fine:
> perl