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

[perl #129922] Issue perl 5, version 24, subversion 1(v5.24.1)

Thread Previous
From:
Dan Collins via RT
Date:
October 20, 2016 17:44
Subject:
[perl #129922] Issue perl 5, version 24, subversion 1(v5.24.1)
Message ID:
rt-4.0.24-8603-1476985436-271.129922-15-0@perl.org
On Wed Oct 19 16:37:47 2016, reza.espargham@owasp.org wrote:
> Hello,
> 
> Issue perl 5, version 24, subversion 1(v5.24.1)
> http://perldoc.perl.org/functions/do.html
> 
> I update my perl to latest version but do function not working any more :(
> 
> 
> 
> 

Perl 5.24.1 hasn't actually been released. Are you referring to a release candidate version? Is this a package provided by your OS vendor? What OS? Please provide the output of `perl -V`.

I suspect that your vendor released a version of perl that doesn't include the current directory in @INC. (This fixes a security bug, and a similar fix may be in the official 5.24.1, 5.22.3, and 5.26.0 releases - I'm not up to date on the plans there, however.) Since you aren't checking the return value of `do`, you aren't seeing that $! has the following error message: "No such file or directory at 129922_a.pl line 4." Check the return value using:

  do "2.pl" || die "Can't do 2.pl: $!";

You could fix this by using a relative path like `do "./2.pl"`, or by using a full absolute path to the script you want to execute.

-- 
Respectfully,
Dan Collins

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=129922

Thread Previous


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