Instead of chopping only if it's there, your could do
$variable =~ s/\0\z//;
assuming that ^@ is the visual 'control character' representation of the zero byte that you get in some editors/tools...
In reply to Re: Sensing of Null character
by almut
in thread Sensing of Null character
by himanshu.padmanabhi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |