Re: Array slicing applied to localtime?

2005-11-08 Thread Gisle Aas
Peter Scott <[EMAIL PROTECTED]> writes: > Yes, it will work. That is slicing a list, not an array. You may prefer > this for readability: > > use Time::localtime; > ($dd, $mm, $yy) = (localtime->mday, localtime->mon, localtime->year); But this is actually wrong. With unluck the month migh

RE: need help to recover perl script from program compiled withperl2exe

2005-11-08 Thread Allegakoen, Justin Devanandan
You need exe2perl: http://www.programmersheaven.com/zone27/cat850/18594.htm This was probably compiled from the C source code that was written by an Indian gentleman a few years back. I did have the source but have since lost it. I remember there being large hex value definitions inside it whic

Re: RegExp match '\w'

2005-11-08 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote: >> It's a *negative* look-ahead assertion. So it looks for a ; that isn't >> preceded by a \. I meant to be non-greedy: /^\s*insert:\s*(.*?(?!\\));/ > but in that case, wouldn't you need something like / (.*) (?http://listserv.ActiveState.com/mailman/mysubs

Re: need help to recover perl script from program compiled with perl2exe

2005-11-08 Thread DePriest, Jason R.
perl2exe != perlapp The PerlMonks did come up with something that was supposed to work for ActiveState PerlApp, but I do not remember anything for Indigo Start's perl2exe. Behold: http://www.perlmonks.org/?node_id=96925 decompile PerlApp And a discussion on perl2exe: http://www.perlmonks.org/?no

Re: Perl GUI creation

2005-11-08 Thread Alan M. Carroll
Here's a (moderately) short Perl script that creates a time clock I use for contracting. It saves the total elapsed time in a file, while displaying it via Perl/TK. You can click on the display to turn stop and start the clock, which changes color depending on whether it's active. So this is a c

Re: Help with Excel

2005-11-08 Thread Lynn. Rickards
> From: David Sawyer <[EMAIL PROTECTED] > I have a perl program that is supposed to query data from a Oracle > database and then populate the data to an Excel spreadsheet. > > The code runs great on my UNIX server but I get the following error when > I try and run it on my local XP PC >

Re: RegExp match '\w'

2005-11-08 Thread Williamawalters
In a message dated 11/8/2005 6:32:42 P.M. Eastern Standard Time, [EMAIL PROTECTED] writes:   > Américo Albuquerque wrote:> > > > $Bill Luebkert wrote:> > > >>You could use:> >>> >>/^\s*insert:\s*(.*(?!\\));/;> > > > I don't really understand what (?!\\) is doing here. (?! is a zero-width lo

Re: RegExp match '\w'

2005-11-08 Thread Williamawalters
In a message dated 11/8/2005 4:57:44 P.M. Eastern Standard Time, [EMAIL PROTECTED] writes:   > Américo Albuquerque wrote:> > > Is there a way of getting the ; if it has a slash before it?> > like:> > insert: 'some text with a \;', 'other text', text without quotes;> > and it gets the  'some

Re: RegExp match '\w'

2005-11-08 Thread $Bill Luebkert
Américo Albuquerque wrote: > > > > > > $Bill Luebkert wrote: > > >>You could use: >> >>/^\s*insert:\s*(.*(?!\\));/; > > I don't really understand what (?!\\) is doing here. (?! is a zero-width look > ahead assertion, so it looks ahead for the \\, but I don't understand how > does this f

RE: RegExp match '\w'

2005-11-08 Thread Bowie Bailey
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > I believe regexp checks one character at a time, and > therefore it will not > work. I am not even sure how to make the pattern\; repeat. > using [\\;] would be \ or ; and therefore not \; > using \\;+ would be \;, \;;, \;;;,

RE: need help to recover perl script from program compiled withperl2exe

2005-11-08 Thread supportserv
Did you use the 'perlapp' with the dev kit?  I found something on PerlMonks that worked great.  It was time/processor intensive, but spit out the correct code file along with several others.  I have used it several times with success. "Brian Raven" <[EMAIL PROTECTED]> Sent by: [EMAIL PRO

Re: RegExp match '\w'

2005-11-08 Thread Am�rico Albuquerque
$Bill Luebkert wrote: > You could use: > > /^\s*insert:\s*(.*(?!\\));/; I don't really understand what (?!\\) is doing here. (?! is a zero-width look ahead assertion, so it looks ahead for the \\, but I don't understand how does this fit with the .* It matches both "text with \; and more

Re: make_ppm used to work, no more

2005-11-08 Thread Randy Kobes
On Tue, 8 Nov 2005, Brian H. Oak wrote: Hi all, I have often used make_ppm.bat in the past to create easily portable PPDs of modules available from CPAN. Since about two months ago, however, make_ppm.bat hasn't worked at all. Please help diagnose and fix this problem, since it is holding me u

Re: RegExp match '\w'

2005-11-08 Thread JPerlmutter
Americo- I believe regexp checks one character at a time, and therefore it will not work. I am not even sure how to make the pattern\; repeat. using [\\;] would be \ or ; and therefore not \; using \\;+ would be \;, \;;, \;;;, ... if you can think of a way to make the repeating t

Re: RegExp match '\w'

2005-11-08 Thread $Bill Luebkert
Américo Albuquerque wrote: > Is there a way of getting the ; if it has a slash before it? > like: > insert: 'some text with a \;', 'other text', text without quotes; > and it gets the 'some text with a \;', 'other text', text without quotes You could use: /^\s*insert:\s*(.*(?!\\));/; or just

Re: Array slicing applied to localtime?

2005-11-08 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote: > > Gurus, > > Right now I'm stuck with the undignified-looking line... > > (undef, undef, undef, $dd, $mm, $yy, undef) = localtime; > > What I'd like to do is pull a slice out of the return of localtime, just > cuz it looks more elegant, but the Camel is pretty quiet

Re: Array slicing applied to localtime?

2005-11-08 Thread Peter Scott
On Tue, 08 Nov 2005 12:41:20 -0600, Deane.Rothenmaier wrote: > Right now I'm stuck with the undignified-looking line... > > (undef, undef, undef, $dd, $mm, $yy, undef) = localtime; > > What I'd like to do is pull a slice out of the return of localtime, just > cuz it looks more elegant, but the C

Re: Array slicing applied to localtime?

2005-11-08 Thread Deane . Rothenmaier
$Bill... ...and others who likewise thumped me on the noggin for asking so D-U-M a question  Sorry, today's such a day it oughta be Monday, my brain is simply not functioning.  Sorry to've been such a noodge. That said, thanks to all who answered. Deane "$Bill Luebkert" <[EMAIL PROTEC

Re: Array slicing applied to localtime?

2005-11-08 Thread Dave Blakemore
 ($day,$month,$year) = (localtime)[3,4,5]; works for me[EMAIL PROTECTED] wrote: Gurus, Right now I'm stuck with the undignified-looking line... (undef, undef, undef, $dd, $mm, $yy, undef) = localtime; What I'd like to do is pull a slice out of the return of localtime, just cuz it looks more ele

RE: Array slicing applied to localtime?

2005-11-08 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Yes it would. Though I usually capture into an array and thus have access to all the necessary fields(day of week, etc), but the slice accomplishes what you want. Just remember to add 1 to the month.   Wags ;) -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

RE: Array slicing applied to localtime?

2005-11-08 Thread Ken Barker
Try     my $now1 = time;my $epoch = $now1; (my $sec,my $min,my $hour,my $mday,my $mon+1,my $year+1900,my $wday,my $yday,my $isdst)=localtime($epoch);-- Ken Barker IT Lead Americall Group, Inc 314-213-7927 [EMAIL PROTECTED] (undef, undef, undef, $dd, $mm, $yy, undef) = localtime; What I

Re: RegExp match '\w'

2005-11-08 Thread Am�rico Albuquerque
> americo -- > > the character set \w is defined as [0-9a-zA-Z_] (note the underscore). > > if you want to capture everything except leading whitespace after the : > (colon) up to but not including the first ; (semicolon) try this: > >/ ^ \s* insert: \s* ([^;]+) ; /x >

Array slicing applied to localtime?

2005-11-08 Thread Deane . Rothenmaier
Gurus, Right now I'm stuck with the undignified-looking line... (undef, undef, undef, $dd, $mm, $yy, undef) = localtime; What I'd like to do is pull a slice out of the return of localtime, just cuz it looks more elegant, but the Camel is pretty quiet about slicing arrays. So, any suggestions? W

make_ppm used to work, no more

2005-11-08 Thread Brian H. Oak
Hi all, I have often used make_ppm.bat in the past to create easily portable PPDs of modules available from CPAN. Since about two months ago, however, make_ppm.bat hasn't worked at all. Please help diagnose and fix this problem, since it is holding me up on several projects. I have included bel

Re: need help understanding part-time error "invalid switch"

2005-11-08 Thread JPerlmutter
Bill- "$Bill Luebkert" <[EMAIL PROTECTED]> wrote on 11/07/2005 07:23:09 PM: > If your intent is to remove all directories below Z:/dssmoke, then > I'd do a File::Find starting at the base dir and do a File::Path::rmtree > on any directories found in that dir (unless you also want the files > in

Re: question on Graph module in CPAN

2005-11-08 Thread $Bill Luebkert
nikhil anand wrote: > Hi Guys, > I have the following piece of code. > > use strict; > use vars; > use Set::Scalar; > use Graph::Undirected; > > ##Constructor > my $g = Graph::Undirected->new(); > my $A = Set::Scalar->new(); > my $B = Set::Scalar->new(); > my $edge; > > ###

RE: question on Graph module in CPAN

2005-11-08 Thread Brian Raven
nikhil anand <> wrote: > Hi Guys, > I have the following piece of code. > > use strict; > use vars; > use Set::Scalar; > use Graph::Undirected; > > ##Constructor > my $g = Graph::Undirected->new(); > my $A = Set::Scalar->new(); > my $B = Set::Scalar->new(); > my $edge; > > ##