I would like to know how  I would say if $item equals $tempitem OR if $item is 
empty(the variable is  a placeholder that has nothing in it), execute command.
Are either of these saying the above statement because I don't seem to be getting the 
expected results.

If ($item =~ /^(\D+)(\d+)/ {)
    If ($1 eq !$tempitem) {
        do an action;
    }else{
        do some other action;
        undef $tempitem;

or

If ($item =~ /^(\D+)(\d+)/ {)
    If ($1 eq defined(!$tempitem)) {
       do an action;
    }else{
        do some other action;
        undef $tempitem;

Reply via email to