Front page | perl.beginners |
Postings from December 2011
open bug?
Thread Next
From:
Tessio Fechine
Date:
December 8, 2011 11:42
Subject:
open bug?
Message ID:
CAKp6VazfJOKxOae7Z38uFmj3FMXOM9FaAtVs+cxJjcBxE2sRew@mail.gmail.com
Hello,
I have a perl script that uses Net::LDAP to query an directory service. It
is invoked like this:
---
search.pl '(cn=peter*)'
---
Today I started another perl script that works on top of search.pl. It
opens search.pl with a piped open, and them process the results.
But I accidentally found that open acted oddly when '(cn=string*)' was
passed to it.
The possible bug is that when I pass a nonexistent file name fallowed by
'(cn=string*)' to open, it do not fail.
---
#!/usr/bin/perl -w
use strict;
# this fail as expected
# open my $search, "nonexistent-script.pl argument|" or die("error: $!\n");
# this does not
open my $search, "nonexistent-script.pl '(cn=peter*)'|" or die("error:
$!\n");
print "This should not appear.. but it does..\n";
---
Thanks for your time.
Thread Next
-
open bug?
by Tessio Fechine