--- [EMAIL PROTECTED] wrote:
> Hello,
>
> I am trying to do this
>
> #!/bin/perl
> $cmd="maheshverama #XXXXXXXXXXXXXXXXXXXXXX#";
> $cmd1=split /\s+/,$cmd;
> print $cmd1;
>
> Wanted the first part to be taken its giving me some numbers as output.
>
Hello,
because split return a list,which is expressed as a number when in scalar
context.This number is the list's length.
you may do,
my ($cmd1) = split/\s+/,$cmd;
($cmd1) force it to be in list context,and get the correct value.
____________________________________________________________________________________
Sick of deleting your inbox? Yahoo!7 Mail has free unlimited storage.
http://au.docs.yahoo.com/mail/unlimitedstorage.html
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/