« first day (216 days earlier)   

00:31
0
Q: regex validating telephone number, but chops white space using perl

Essi JoonSo I have an HTML field in a form that takes in a phone number. It validates it correctly when I use () or / or - however, if I put in say 555 123 4567, it returns 555. As always your help is greatly appreciates it. Here is my code my $userName=param("userName"); my $password=param("password")...

01:17
0
Q: Negative look-ahead in pattern matching

ssnI know that the regex q(?!u) means q not followed by u. But what if I encounter a regex (?!u)? Does it mean a null not followed by u or just anything but a u or something else?

 
3 hours later…
03:58
-3
Q: How can I get all my emails off Gmail using Perl?

user3404787I want to get all my emails off Gmail. I was just thinking HTML::TreeBuilder, but maybe someone here is knows of an optimal solve. I'd have to visit all pages in my inbox, sent, etc. and visit each page from 1 to who knows on each page. I think it'd be easy to capture the end points on each page ...

 
1 hour later…
05:17
1
Q: How to calculate variance in perl?

olalaI want to calculate variance for each row of numbers in perl. I've written this subroutine: ################################################################ # variance # # # A subroutine to compute the variance of an array # division by n-1 i s used # sub var{ my ($data) = @_; if (@$data ==1) { ...

 
3 hours later…
08:45
0
Q: Adding a .zip file to the body of an LWP::UserAgent POST request

CodeGorillaI believe I have a general Perl problem, rather than an LWP::UserAgent problem... however its somewhat complex. The task is to write a test-script that does a SWORD deposit. I create tests by first writing code to prove the thing works, then add in the Test::More wrappers to make it a test. BAC...

 
2 hours later…
11:08
0
Q: Obtaining blob jp2 format from PerlMagick?

RobertI tried to convert png files withing a script using Image::Magick but it seems that it does not work for me (although I have an image in the $file, after the ImageToBlob command is executed, I have an empty blob): my $image = $file->ImageToBlob(magick => 'jp2', quality => 90); Can anyone tell ...

0
Q: Map strange behaviour

AkshaiShahI have a map function as follows, which reads from an array of lines generated by a unix command. my %versions = map { if (m/(?|(?:^Patch\s(?(?=description).*?(\w+)\sPATCH).*?(\d+(?:\.\d+)+).*)|(?:^(OPatch)\s(?=version).*?(\d+(\.\d+)+)))/) { 'hello' => 'bye'; } } @dbnode_versions; p...

0
Q: search a certain pattern with / upto black line

user3419558[test:/IT/CCIT/treasury/ccmc] @TreasDevSVN = rw [test:/IT/CITS/xxswtg] @swtgautogroup = rw I want to find a certain pattern upto blank line in sh or perl. example i want output below [test:/IT/CITS/xxswtg] @swtgautogroup = rw if my input like /IT/CITS/xxswtg

0
Q: perl: extract substring enclosed between specific strings

user2200678(Looked at other similar questions and answers and got intimidated - and thus ask your forgiveness if this is a redundant and/or too simple of a question.) Need to extract a substring enclosed by operators, say, "" and "". Example: "Irrelevant text is here the substring I am looking for other ...

11:32
0
Q: Get a part of a line with the matching string from a paragraph using perl grep

user3094070I have an array ,the contents of which is given below: print Dumper(\@jsession); $VAR1 = [ '<html><body><form name = \'form\' id=\'form\' method = \'POST\' action = \'/mySite.jsp\'><input type = hidden name = \'phpSessionID\' value = \'GZbtXhI9JiQ**\'><input type = hidden name = \'Logg...

12:31
1
Q: Why is MIME::Lite->new() is not working in my server?

PengaI have the following code to mail #!perl use MIME::Lite; open (LOG_FILE, '>Mail_Log.txt'); print LOG_FILE " creating mail\n"; $msg = MIME::Lite->new( From =>'[email protected]', To =>'[email protected]', Subject =>'Congrats', Data =>"some messgae." ); print LOG_FILE " attaching to mai...

1
Q: finding ram type with perl/cmd windows

MaartenSI am creating a script that gathers the pc specs(windows) and mails em to the tech support. currently I am stuck on finding the RAM type. systeminfo only shows me the ammount available. i have been able to find a lot of info using wmic memorychip get xxxx,xx but I can't seem to find what type...

 
1 hour later…

« first day (216 days earlier)