develooper Front page | perl.perl5.porters | Postings from October 2018

Re: [perl #133558] perl 5.26: use lib pragma issue in IBM AIX

Thread Previous | Thread Next
From:
Gururaj Kallur
Date:
October 9, 2018 08:55
Subject:
Re: [perl #133558] perl 5.26: use lib pragma issue in IBM AIX
Message ID:
CAEbNYu4J7PrLi4ZXFHGvVBknBj8kUmtZPAFbDCjCdOgaVPU=nA@mail.gmail.com
No output for the line

-bash-4.2$ perl -le 'sub f { for (reverse @_) { print "[$_]" } }
f("/foo/bar");'
-bash-4.2$

I have written small code to test the reverse behaviour.
Here is the file reverse.pl
-bash-4.2$ cat reverse.pl
#!/usr/bin/env perl
use strict;
use warnings;
use 5.26.1;

my @words = qw(Foo Bar Moo);
my @sdrow = reverse @words;

foreach (@sdrow){
print "$_\n";
}
-bash-4.2$ perl reverse.pl
Moo
Bar
Foo

After changing the foreach loop as below

-bash-4.2$ cat reverse.pl
#!/usr/bin/env perl
use strict;
use warnings;
use 5.26.1;

my @words = qw(Foo Bar Moo);
my @sdrow = reverse @words;

foreach (reverse @words){
print "$_\n";
}
-bash-4.2$ perl reverse.pl
-bash-4.2$

No output

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About