Chomp to trim '\r'

2003-10-07 Thread Manjula Babu
I was trying to execute the followin perl code snipet on a Windows XP system. I used chomp to trim the trailing spaces, new line character and carriage return. But chomp does not trim carriage return ('\r') character, due to which the code does not come out of the loop. while( $pass1 eq ||

Keyboard input sting on Win32 pltform

2003-07-18 Thread Manjula Babu
hi all, i have a code snippet as below: while( $pass1 ne $pass2 ) { while( $pass1 eq || $pass1 !~ /^[a-zA-Z0-9-_]{3,16}$/ ) { print Enter a password for the administrator account: ; $pass1 = STDIN; chomp $pass1; print Hello\n; print You entered