http://qs321.pair.com?node_id=11137798

jerryhone has asked for the wisdom of the Perl Monks concerning the following question:

Hi brethren,
I have encountered a very strange issue, and I'm looking for advice on how to start finding the root cause... I have a VERY old script with line 1 which says
#!/opt/bin/perl5.004
To support its update to use Oracle 19c, I've changed that to
#!/opt/oraClient/11.2.0.4/perl/bin/perl
However, I now find that the behaviour has changed, and when I drill into it with the debugger I find the problem seems to be with the diamond file handle The code says
while( <> ) { &assert ( (substr($_,0,4) eq "573\r") , "blah, blah...
What I'm seeing is that in the original Perl, I am not going into the while loop, but with the new version, I am! Command line is identical for each version, environment is identical for each version - the only change is line 1! Any thoughts on how I can get to the bottom of this...?