Hi guys, I am trying to implement a switch statment in perl. I have tryed doing it 2 way's. For some reason my comparison statments are not working can some one please look over my code and see if they can point me on the right track ??
Thanx in advance, Mark Solution 1: while( ( $Remainder = ($P_lenght%16065) ) != 0 ) { print "\a size you gave is not multiple of cylenders\n"; print "round (U)p (D)own (R)enter ?"; $Ans=<>; # chomp ($Ans); print $Ans; for ($where){ /u/ && do{print "u\n";}; /d/ && do{print "d\n";}; # default print "enter partition length : "; chomp ( $P_lenght=<> ); } } _exit 0; solution 2: while( ( $Remainder = ($P_lenght%16065) ) != 0 ) { print "\a size you gave is not multiple of cylenders\n"; print "round (U)p (D)own (R)enter ?"; $Ans=<>; # chomp ($Ans); print $Ans; if( $Ans =~ /u/i ){ $P_lenght = ($P_lenght - $Remainder+$CYLLENGTH); } elsif( $Ans =~ /d/i){ $P_lenght-=$Remainder; } # default else{ print "enter partition length : "; chomp ( $P_lenght=<> ); } } _exit 0; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]