If
you have a question on how to do something in Perl, or
you need a Perl solution to an actual real-life problem, or
you're unsure why something you've tried just isn't working...
then this section is the place to ask. Post a new question!
However, you might consider asking in the chatterbox first (if you're a
registered user). The response time tends to be quicker, and if it turns
out that the problem/solutions are too much for the cb to handle, the
kind monks will be sure to direct you here.
I have tried and tried to unpack this into 4 perl variables in a single unpack() call and failed.
I had to resort to two unpack()'s, the first to extract the lengths followed by something like
It currently produces a "readline() on closed filehandle FILE" if there is a space in the path. I've done a lot of research and the answer is quoting the path. I think I've done that. I'm running perl5.10.0 on MacOS 10.6.8.
Hi monks, I just registered. Thanks in advance!
I want to use WWW::Mechanize::get in an inherited class's "get" subroutine, but it does not export any error (like "GETting...") even while the Internet access is out. See my code:
package MyMech;
use base qw(WWW::Mechanize);
sub new {
my $class = shift or die $!;
my $self = $class->SUPER::new;
return bless $self, $class;
}
sub get {
my $self = shift;
$self->SUPER::get(@_);
}
I think the get routine should work just like the base class' one, but it never die when it fails GETting.
When I call the class and use the get subroutine while the Internet access is out, it just pass through the GETting error without saying anything and $mech->title produces "Uninitialized..." error.
It works perfectly when the access is not out.
Does anybody know why it happens? Thank you so much!
Return code = 65280
Error = No such file or directory
I have ensured that C:/zip.exe files exists and is executable. I tried executing other system binaries like cmd.exe but ran into the same issue.
My question is what could be causing this issue like
i. some environment setting is wrong and interfering with the system api and hence it is not able to load the binary.
ii. The $PATH variable in this environment is greater than 1024 characters. Is the length of this variable a concern or some paths set in this variable is causing this issue
Im curious if someone would be so kind as to share their experiences setting up a minimal perl container in lxc, openvz, bsd jails, linux-vserver or even chroots.
App::Staticperl (http://software.schmorp.de/pkg/App-Staticperl.html) looks like it might be a good starting point - if i wanted to avoid a stripped down installed of <favourite distro or bsd>
The ideal outcome would provide a container with mcpan and a given version of perl. Possibly some fusion of perlbrew and some dark magic to cook up the perl version then drop it in the container.
Use case is to wrap up apps and put resource limits on them. PAAS like really. I know uwsgi can use namespaces and what not, if someone has used that - please share!
when we use scalar keys %MyHash to get count of keys in a hash, does perl actually go through every key? I mean if it is a big hash having more than 100,000 keys, does it slow down?
I am able to read a mail from the inbox. My actual requirement is to fetch a mail from a subfolder in Outlook by comparing the subject of the mail in the Sub-Folder with a predefined text.
use Mail::Outlook;
use Win32::OLE::Const 'Microsoft Outlook';
my $outlook = new Mail::Outlook();
my $folder = $outlook->folder('Inbox');
my $message = $folder->last();
my $text = $message->Subject();
my $text1 = $message->From();
print "From : $text1\n";
print "Subject : $text\n";
Using the code above I can read the subject and from address of the mail in the inbox. But I'd like to read a mail from the sub-folder. Please provide some tips.