in reply to Text output problem
I don't see what's leading up to populating $export, nor what leads in to your if() statement. But something does seem odd. Do you ever expect $export to contain the literal text 'y||Y'? Or do you intend || to be treated like some "or" operator?
It's possible that you really need:
if( $export =~ m/y|Y/ ) {....}
Which can also be written as:
if( $export =~ m/y/i ) {....}
Or...
if( $export =~ m/[yY]/ ) { .... }
But probably should be more like:
if( $export =~ m/^y/i ) {....}
As that will assure that it's not picking up some random 'y' buried anywhere in the input.
Dave
|
|---|