ActiveState Perl 5.34 Command line opts -lane and $F prints ARRAY(0x22f8a8) not strings

Hello,

Attempting under Windows 11 / WSL2 Ubuntu to use ActiveState Perl 5.34 command line execution options line ending, autosplit, and $F variables via the -lane switches does not yield expected results, showing “ARRAY()” instead of the actual strings. The same command performs as expected in Perl 5.30 , however. Have I done something worng?
Thanks,
Wil Blake
Example results follow in text and in screenshots.

perl -F/,/ -lane ‘print $F[-1]’ BeginningReverse.csv | head
ARRAY(0x22f85a8)
ARRAY(0x23015a0)
ARRAY(0x2300ef8)
ARRAY(0x23015b8)
ARRAY(0x22f85a8)
ARRAY(0x2301588)
ARRAY(0x22f8668)
ARRAY(0x23015a0)
ARRAY(0x2300ef8)
ARRAY(0x23015b8)
Input file
ITEM,BID,NEWCALL,bib call,TITLE,MEDIA,LOCCODE
21982024221263,42124,ER BECK,E BECK - BEGINNING TO READ,Birthday for Bear /,BOOK,EPRDR
21982024221198,42124,ER BECK,E BECK - BEGINNING TO READ,Birthday for Bear /,BOOK,EPRDR
21982024221214,42124,ER BECK,E BECK - BEGINNING TO READ,Birthday for Bear /,BOOK,EPRDR

The expected results appear in perl 5.30

wblake@CB95043:~/Workspace/ItemAPI-Return$ perl -F/,/ -lane ‘print $F[1]’ BeginningReverse.csv | head
BID
42124
42124
42124
42124
42124
42639
42639
42639
42639

2 Likes

Wil,

There are no changes between Perl 5.30 and 5.34 that we are aware of that would cause the change in behaviour.

Additionally, we are unable to reproduce the behaviour you’re seeing on our end using Perl 5.34 on Linux. It may be a WSL-specific error. If possible, can you try to reproduce on a non-WSL Linux?

Hello danac,

Thanks for your help. I will find a Ubuntu system and try it there. The command line script worked fine with the Perl5.34 State Tool project in the plain Windows 11 Cmd.exe shell.

Regards,
Wil Blake

I could not yet get to a modern Ubuntu system and ran 20.04 under HyperV with the same unexpected results as WSL.

DanaC,

Please use my Project wilb/ItemAPI-Return to test. I get the same unexpected result with that Perl 34 based project on Windows 11 and VMWare Workstation hosting a Ubuntu 20.04 Guest OS.

Regards,
Wil Blake


wilb,

Thanks for digging into this. At first look, it appears to be a bug on our side with how we’re interpreting variables when running Perl in a shell. We are looking into it, and will update you.

Thanks,