On Fri, Oct 26, 2012 at 6:27 AM, Praveen Kumar
<kumarpraveen.nit...@gmail.com> wrote:
> Hi folks,
>
> Check out below code, is this as expected or kind of bug?
>
> <code>
> use strict;
> use warnings;
> use CGI;
>
> my $product_id="484f2faee9334559a1a72b4cdc056818";
> print "Enter NT Login ID : ";
> chomp (my $user = <STDIN>);        #praveenku...@gmail.com
>
> print "Enter NT Password : ";
> chomp (my $password = <STDIN>); #randompass
> print "Enter Build Number : ";
> chomp (my $bfolder = <STDIN>);     #12
>
> print "User : $user, Password : $password, build : $bfolder";
>
>
> ======= Output =====
> C:\Users\pkumar22\Desktop\MAT_Testing>perl matrix-getbuildoutputurl.pl
> Enter NT Login ID : praveenku...@gmail.com
>
> Enter NT Password : randompass
> Enter Build Number : 12
> , build : 12 randompassil.com --> This is what I am getting
>
> User : praveenku...@gmail.com, Password : randompass, build : 12  -->
> This is what I expect.
>
> </code>
>
> --
> Praveen Kumar
> http://fedoraproject.org/wiki/User:Kumarpraveen
> http://fedoraproject.org/
> http://kumar-pravin.blogspot.com

Hello,
I don't use CGI, but if you look at the values returned from reading
STDIN, you will notice they have a carriage return and a newline as
the last two characters. If CGI is not in the mix, the values only
have a newline (no carriage return).
Someone more familiar with GCI may be able to explain this.
By the way, I tested on Windows XP.
HTH, Ken

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to