looks like end of line charactors are getting mucked
up.  i'm not sure what cmd.exe does, but it is more
forgiving then other windows programs.  try doing a
capture of ipconfig.exe and you will see the same
problem.  i don't have my code on me to see what i
did, but i think this should do the trick.  try using
a regex to fix the end of line charactors.

$cmd =~ s/\r/\n/g;

This will substitute return charactors with new line
charactors globaly. 

--- karthikeyan <[EMAIL PROTECTED]> wrote:
> Dear All,
> 
>   Hope you are all having a great day.
> 
>   I have a problem.  I m running a java program
> through perl like this :
> 
>   $cmd = 'java SSLTest';
>   
>   It returns output like this :
> 
>   Using ClearCommerce SSL Java API Version:
> release-3-8-3-17 Shipping: 10.0 Tax: 0.0 Time - Sat
> Jun 22 07:28:42 2002 Ref# - 12345678 Appr - APPROVED
> Code - 123456 AVSCode -  PayServ -  Err  -  Ord# -
> 12.45.92.15-1024748922-901932-1575-14
> 
>   when you run the program in the command line mode
> I would get something like this so that you don't
> get confused 
> 
> Using ClearCommerce SSL Java API Version:
> release-3-8-3-17
> 
> Shipping: 10.0
> Tax: 0.0
> Time - Sat Jun 22 07:28:42 2002
> Ref# - 12345678
> Appr - APPROVED
> Code - 123456
> AVSCode - 
> PayServ - 
> Err  - 
> Ord# - 12.45.92.15-1024748922-901932-1575-14
> 
>   Now what I want to do here is get each name and
> value in a separate separate variable like :
> 
>   $Shipping  will contain 10.0, $Tax will contain
> 0.0, $Time will contain Sat Jun 22 07:28:42 2002
> 
>   how do I parse those string and store it in a
> variable. 
> 
>   Any help regarding this would be greatly
> appreciated.
> 
>   Have a great day.
> 
> karthikeyan.
>
-------------------------------------------------------------------------------------------------------------
> Judge not, that ye be not Judged - Abraham Lincoln's
> favorite quote
>
-------------------------------------------------------------------------------------------------------------
> 


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to