Hi, I have a certain variables of emplyee number which comes in the format of [a0000000] or [u0000000] {whereby 0000000 is some serial numbers}.
I would like to remove the enclosed [ & ] see if it is belong to class a or u , i can do it as follow $var = /\[//; $var = /\]//; if ($var =~ '^a) { print "$var is class A"; } elsfi ($var =~ '^u) { print '$var is class U"; } $var = /a//; $var = /u//; How can i remove the chars all in a single line? and write the code in a more perl manner ? regards rexo