in reply to Re: printing the subscript separator
in thread printing the subscript separator
It's not generally a good idea to set it globally but when you really want undef to behave like an empty string for a few lines it's not a bad approach.
{ no warnings 'uninitialized'; print $op if $op =~ /\S/; }
To be honest it's probably not appropriate for a single line like this but it's a good tool to have in your box.
Another useful tool is for(SCALAR).
for ($op) { print if defined && /\S/; }
|
|---|