I am searching the following words in .todo files:
ZshTabCompletionBackward
MacTerminalIterm
I made the following regex
[A-Z]{1}[a-z]*[A-Z]{1}[a-z]*
However, it is not enough, since it finds only the following type of words
ZshTab
In pseudo code, I am trying to make the following regex
([A-Z]{1}[a-z]*[A-Z]{1}[a-z]*){1-9}
Ho...
I am writing a Perl/Tk script which displays Excel worksheets using the ss2tk example script from the Spreadsheet::Read module. It does not round off two decimal places but the function from Spreadsheet::XLSX::Utility2007 does round off to two decimal places. Why? I'm trying to use that second function as a feature of my program to offer...
I have a process which gives me continuously output in Screen. I want to search CamelCase words by the following Perl's regex in the output such that I can monitor actively the outputs.
/\b([a-z]*[A-Z][a-z]*){2,}\b/
...
The purpose of the regex search is to determine all template class instances from C++ header files. The class instances can be formarted such as:
CMyClass<int> myClassInstance;
CMyClass2<
int,
int
> myClass2Instacen;
The search is performed by loading the entire file into a string:
open(FILE, $file);
$string = join('',<FILE>);
close...
I have a (set of) Word document(s) for which I'm trying to get various properties (number of pages, author, etc) using Win32::OLE in Perl:
print $MSWord->Documents->Open($name)->
BuiltInDocumentProperties->{"Number of pages"}->value . " \n";
This returns 4 pages. But the actual number of pages in the document is 9. The number of pages...
I see a lot of 'related' questions showing up, but none I looked at answer this specific scenario.
During a while/for loop that parses a result set generated from a SQL select statement, what is the best way to prevent the next line from being outputted if the line before it contains the same field data (whether it be the 1st field or t...
Hi,
I was reading this morning the book The Pragmatic Programmer Chapter 3 on Basic Tools every programmer should have and they mentioned Code Generation Tools.
They mentioned one Perl script for C++ programs which helped automate the process of implementing the get/set() member functions for private data members.
Does anyone know abou...
[cross posted again to Mahalo answers]
My Perl/Tk script has an initial spreadsheet like grid displayed using the Tk::TableMatrix::Spreadsheet modules. My spreadsheet is programatically called $ss. This initial grid is wiped before the display of the first spreadsheet, with
$ss->pack('forget');
The script as it is now also adds $mw-...
Heylo,
I want to calculate (using the default Perl installation only) the number of days between two dates. The format of both the dates are like so 04-MAY-09. (DD-MMM-YY)
I couldn't find any tutorials that discussed that date format. Should I be building a custom date checker for this format? Further reading of the Date::Calc on CPAN ...
I need to create a text file (aptest.s) that Ican use to read into another program. I am using Perl because I have a large list to work from. My code is as follows (which does not give the desired output - shown after code and actual output). Any help would be appreciated.
#!/usr/bin/perl -w
chdir("D://projects//SW Model ODME");
@link =...
Hi everyone,
I have written a Perl script that performs many one-sample t-tests. I get thousands of t-statistics with their degrees of freedom (df). I need to upgrade the script to also return their p-values (there are too many to look them up manually in a table). Is there some kind of formula I can use for this with the t-statistic an...
Is there a script to extract the embedded fonts from a PDF file?
...
I am trying to make a webpage with Ajax.
Example:
I create a Perl/CGU file that triggers a simple post;
File: ..test.cgi?name=Thomas
Text back: Your name is Thomas!
I create a html file that can use the post, but then the page have to reload.
I use text input and a button.
How can I use Ajax, Perl and JSON easy together?
This is h...
Hello all,
I have a text file in the following format:
211B1 CUSTOMER|UPDATE|
211B2 CUSTOMER|UPDATE|
211B3 CUSTOMER|UPDATE|
211B4 CUSTOMER|UPDATE|
211B5 CUSTOMER|UPDATE|
567FR CUSTOMER|DELETE|
647GI CUSTOMER|DELETE|
I want a script that processes the text file and reports the following:
"UPDATE" for column CUSTOMER found...
For hobby purposes, I have a shared space on a hosting server that is providing, as many of them are, both PHP and Perl CGI. I have read on several places that CGI scripts are obsolete now, I think mainly for performance issues (like http://stackoverflow.com/questions/313083/is-php-or-vanilla-perl-cgi-faster).
But since I just started ...
I'm trying to use Perl ODBC to connect to a Microsoft SQL server. My problem is that Perl 5.10.0 is having a problem using the Win32 ODBC driver.
If I run a Perl shell and execute this one line, I get errors.
use Win32::ODBC;
Can't load '/usr/lib/perl5/vendor_perl/5.10/i686-cygwin/auto/Win32/ODBC/ODBC.dll'
for module Win32::ODBC: No ...
I'm writing a Perl script to connect to an IMAP server that requires TLS over port 143. The server does not support connecting over SSL. Thus far, the Perl IMAP modules I have found support only SSL, not TLS.
Are there any Perl IMAP modules that provide TLS support? Thus far I have looked at:
Net::IMAP
Net::IMAP::Simple
Net::IMAP::Clie...
I've been parsing Excel documents in Perl successfully with Spreadhsheet::ParseExcel (as recommended in http://stackoverflow.com/questions/429193), but I can't figure out how to extract cell comments.
Any ideas? A solution in Perl or Ruby would be ideal.
...
How do I extract the domain out of an URL? Is there a Perl Module? I could not find any.
...
Hey I was just wondering if there is a cool "one liner" that would sort my hash holding array references. So I have a bunch of key/values in my hash something like:
$DataBase{$key} = \@value;
However I would like to sort the hash by the array[0] element. Then loop through 'em. I had this to begin with:
foreach my $key (sort {$DataBa...