my $real = hex($var);
print $real;

returns 0.

-----Original Message-----
From: $Bill Luebkert [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 22, 2004 4:00 PM
To: Chuck Lee
Cc: [EMAIL PROTECTED]
Subject: Re: Strange Problem


Chuck Lee wrote:
> So I'm using ` to execute a system command because I want to examine the
> output of the command.
>
> my $var = `c:\windows\blah.exe`;
>
> If I run the command from the command line I get:
>
> This ran fine.
>
> Now if I look at the variable $var I get:
>
> T h i s   r a n   f i n e.
>
> So this is strange.  See what happens if I strip out the spaces:
>
> $var =~s/\s+//;
>
> or
>
> $var =~s/ //g;
>
> And the out is the same.  Perl doesn't seem to recognize the spaces.
>
> Any ideas of what can be going on here?

Not yet, try dumping $var in hex to see what's really there.

--
  ,-/-  __      _  _         $Bill Luebkert    Mailto:[EMAIL PROTECTED]
 (_/   /  )    // //       DBE Collectibles    Mailto:[EMAIL PROTECTED]
  / ) /--<  o // //      Castle of Medieval Myth & Magic
http://www.todbe.com/
-/-' /___/_<_</_</_    http://dbecoll.tripod.com/ (My Perl/Lakers stuff)


_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to