On Feb 12, 2008 4:01 AM, Dr.Ruud <[EMAIL PROTECTED]> wrote:
> "David Moreno" schreef:
>
> > rvtol+news:
>
> Stop top-posting.
Stop inline posting :p
> The question was about a string that looks very much like a path and
> filename.
> If it is about a path and filename, then there can be platfo
Thanks Thomas for your help.
It met my requirement
-Original Message-
From: Thomas Bätzler [mailto:[EMAIL PROTECTED]
Sent: Monday, February 11, 2008 7:01 PM
To: beginners@perl.org
Cc: Allam Reddy, Thomas
Subject: RE: Tokenizing a string
Allam Reddy, Thomas <[EMAIL PROTECTED]>
"David Moreno" schreef:
> rvtol+news:
Stop top-posting.
>> Or not code a regex at all, and use a module like
>> File::Basename or File::Spec.
>
> But where's the fun then? :)
The question was about a string that looks very much like a path and
filename.
If it is about a path and filename, then
But where's the fun then? :)
On Feb 11, 2008 4:09 PM, Dr.Ruud <[EMAIL PROTECTED]> wrote:
> Or not code a regex at all, and use a module like File::Basename or
> File::Spec.
--
David Moreno - http://www.damog.net/
Yes, you can.
"Martin Barth" schreef:
> Allam Reddy, Thomas:
>> I have a string "jdbc/abc.xml" which I wanted to tokenize using the
>> delimiter "/"
>> May I know the perl code for this?
>
> you could use split in this situation.
>
> @tokens = split(/\//, $string);
> the frist parameter to split is a regular ex
Allam Reddy, Thomas <[EMAIL PROTECTED]> asked:
> I have a string "jdbc/abc.xml" which I wanted to tokenize
> using the delimiter "/"
> May I know the perl code for this?
my $string = 'jdbc/abc.xml';
my @tokens = split /\//, $string;
print 'Tokens: ' , join( ',', @tokens ), "\n";
HTH,
Thomas
--
On 12:33:09 11/02/2008 "Allam Reddy, Thomas" <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
> I have a string "jdbc/abc.xml" which I wanted to tokenize using the
> delimiter "/"
> May I know the perl code for this?
>
> Thanks
> Thomas Reddy
hi,
you could use split in this situation.
@tokens = split(/\
Hi All,
I have a string "jdbc/abc.xml" which I wanted to tokenize using the
delimiter "/"
May I know the perl code for this?
Thanks
Thomas Reddy