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 ||
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