Eval not working on code

2007-03-22 Thread Kevin Old
nline I'm not sure what I'm doing wrong. Can anyone see the mistake(s) I'm making? Thanks, Kevin -- Kevin Old [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

[JOB] Web Developers for publishing company - Charlotte, NC

2007-01-23 Thread Kevin Old
See our posting at http://jobs.perl.org/job/5243 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Cleaning smart quotes, etc from data pasted to a form

2006-10-05 Thread Kevin Old
s of course, good ole cut and paste. Like I said, I have several "sanitize" routines that clean control characters, etc. out of the input fields. Just wondering if others have found "the solution" for stuff like this. Thanks for any help, Kevin -- Kevin Old [EMAIL PROTECTED]

Re: Javascript Regex to Perl Regex

2006-03-23 Thread Kevin Old
t; $fcode =~ s/^\s*function\s+(?:\w+\(\)\s*)?\s*\{\s*\n//gi; > > but I don't have any code to test it on. What do you expect to happen, > and what is really happening? > > -Original Message- > From: Kevin Old [mailto:[EMAIL PROTECTED] > Sent: Thursd

Javascript Regex to Perl Regex

2006-03-23 Thread Kevin Old
return fcode; } catch (e) { return "SYNTAX ERROR: " + e.message; } } "code to format here" Output here Any help is appreciated, Kevin -- Kevin Old [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Escaping large chunk of text for insertion into mysql

2006-02-01 Thread Kevin Old
e binary data in it (that's why I mentioned blob above). How can I escape them all so it'll go in? Thanks for any help, Kevin -- Kevin Old [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Constant Hash problem

2005-12-19 Thread Kevin Old
On 12/16/05, John W. Krahn <[EMAIL PROTECTED]> wrote: > Kevin Old wrote: > > On 12/16/05, John W. Krahn <[EMAIL PROTECTED]> wrote: > >>Kevin Old wrote: > >> > >>>I'm trying to define a constant hash and have the following: > >>&g

Re: Constant Hash problem

2005-12-16 Thread Kevin Old
On 12/16/05, John W. Krahn <[EMAIL PROTECTED]> wrote: > Kevin Old wrote: > > Hello everyone, > > Hello, > > > I'm trying to define a constant hash and have the following: > > > > use constant STOPWORDS => map { lc $_ , 1 } qw(a about above across

Constant Hash problem

2005-12-16 Thread Kevin Old
er); use constant STOPWORDS => \%stopwords; I'm wondering what I'm doing wrong in the first definition. Any help is appreciated! Kevin -- Kevin Old [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/

Complex Array Regex

2005-11-16 Thread Kevin Old
. Just wondering if anyone can shed some light on this. Any help is appreciated! Kevin -- Kevin Old [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Help with sprintf

2005-09-12 Thread Kevin Old
t;%02d", $time[4]) . '01'; My result is: 20050901, but what I'm trying to get is 050901. Any ideas what I'm doing wrong? Thanks, Kevin -- Kevin Old [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Help with hash of dates

2005-08-08 Thread Kevin Old
On 8/8/05, Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> wrote: > On Aug 8, Kevin Old said: > > > I'm trying to come up with a way to automatically create a hash like > > the following: > > > > It's a hash with the start and end date for each we

Help with hash of dates

2005-08-08 Thread Kevin Old
a::Calc, Date::Manip and have scoured them for every possible way of coming up with something like this, but I can't seem to get it. Ultimately, if I could find a solution that would give me dates like these for any day range (for example Tues - Mon) and a start and end date and it fill

Re: Need first line of Excel Spreadsheet

2005-03-30 Thread Kevin Old
g/~kwitknr/Spreadsheet-ParseExcel-0.2603/ParseExcel.pm in the Synopsis section and play around with the for loops to have it break after the first row. Here's a great column on using File::Find. http://www.stonehenge.com/merlyn/LinuxMag/col45.html Sorry for the lack of syntax, but if you need some

Re: scp in perl

2005-03-02 Thread Kevin Old
PAN for the Net::SCP module lets you interface with scp just as easy as using Net::FTP. HTH, Kevin -- Kevin Old [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Regex for file uploads - help needed

2005-03-02 Thread Kevin Old
On Wed, 02 Mar 2005 13:31:02 -0500, Wiggins d'Anconia <[EMAIL PROTECTED]> wrote: > Kevin Old wrote: > This is probably going to take a bit more info. Why would there be two > extensions? Unless you have some rules to locate double extensions this > is probably going to b

Regex for file uploads - help needed

2005-03-02 Thread Kevin Old
# Here I'm consolidating underscores $thefilename =~ s/__/_/g; print "consolidate underscores: $thefilename\n"; Of course I'd also like to remove the "double" extension (i.e. Kerr Price Protection & Titles March.xls.pdf) and just keep the last extension, in this ca

Calculating week numbers across years

2004-12-20 Thread Kevin Old
except if "today" were sometime in the new year. Then I'm comparing week 52 to week 3. Can anyone offer suggestions on how to calculate those frequencies across years? -- Kevin Old [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Simple if conditional

2004-11-17 Thread Kevin Old
fined I can't get this to print the "it was delivered" string. > > > > I have tried placing parenthesis around the logical OR > > statement as well: > > > > if ( > > ($activity->child("Status")->child("StatusType")->child(&

Simple if conditional

2004-11-17 Thread Kevin Old
logical OR statement as well: if ( ($activity->child("Status")->child("StatusType")->child("Code")->value eq 'D' || $activity->child("Status")->child("StatusCode")->child("Code")->value eq 'DS') && defined $activity->child("ActivityLocation")->child("Address")->child("AddressLine1") ) { print "*IT WAS DELIVERED***\n"; } Still no luck. Can someone tell me what I'm doing wrong? All help is appreciated, Kevin -- Kevin Old [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Need help with regex

2004-11-04 Thread Kevin Old
for the replies. My first thought was to use split on the spaces, but the "NET 60 DAYS" could throw that off and the fact that the line can have additional spaces, etc. I found out that the line I am trying to parse is being produced in fixed-width, so here's my solution: my @li

Re: Need help with regex

2004-11-04 Thread Kevin Old
On Thu, 4 Nov 2004 10:05:08 -0600, Larsen, Errin M HMMA/IT <[EMAIL PROTECTED]> wrote: > > -Original Message- > > From: Kevin Old [mailto:[EMAIL PROTECTED] > > Sent: Thursday, November 04, 2004 9:38 AM > > To: [EMAIL PROTECTED] > > Subject: Need he

Need help with regex

2004-11-04 Thread Kevin Old
S, it doesn't return the custnum. $_ =~ /\d+\s+\d+\/\d+\/\d+\s+(\w+).*(UPS\w+)\s/; $custnum = $1; $isups = $2; I know I'm missing something basic. I've even tried grouping it and trying the zero or more matching: $_ =~ /\d+\s+\d+\/\d+\/\d+\s+(\w+).*(?:(UPS\w+)\s)*/ This doesn&#

Re: Printing to a file

2004-10-26 Thread Kevin Old
On Tue, 26 Oct 2004 19:17:11 +0200, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: > Kevin Old wrote: > > First, this is a basic problem, but I have looked at it for over an > > hour and wasted time. Now, I'm asking for help. > > Just an hour, and you think

Re: Printing to a file

2004-10-26 Thread Kevin Old
On Tue, 26 Oct 2004 10:57:39 -0500, JupiterHost.Net <[EMAIL PROTECTED]> wrote: > > > Kevin Old wrote: > > > Hello everyone, > > > > First, this is a basic problem, but I have looked at it for over an > > hour and wasted time. Now, I'm asking for

Printing to a file

2004-10-26 Thread Kevin Old
print "match: $_\n"; my $line = $_; print MY $line; } } + close MY; close SD; }, "."; Thanks, Kevin -- Kevin Old [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Parsing multiline data

2004-10-20 Thread Kevin Old
the end of the section. Any ideas how I'd do this? Thanks, Kevin -- Kevin Old [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Regex for logwatch report

2004-10-05 Thread Kevin Old
} Thanks again, -- Kevin Old [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Regex for logwatch report

2004-10-05 Thread Kevin Old
On Tue, 05 Oct 2004 22:36:45 -0400, Randy W. Sims <[EMAIL PROTECTED]> wrote: > On 10/5/2004 10:25 PM, Kevin Old wrote: > > Hello everyone, > > > > I'm parsing a Logwatch report I get daily from my server and have hit > > a snag. I'd like to grab e

Regex for logwatch report

2004-10-05 Thread Kevin Old
t and continue pushing lines onto array if pam_unix Begin stop pushing lines onto array if pam_unix End I know this is extremely simple, but I just can't seem to figure it out. Anyone have ideas? Thanks, Kevin -- Kevin Old [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED

Script using too much memory

2004-09-20 Thread Kevin Old
a way to get my data run through the script, by only calling a few files, rather than all of them, but I'd like to know if I'm doing something that is causing this "memory leak". Thanks, Kevin -- Kevin Old [EMAIL PROTECTED] itmstsload.pl Description: Binary data -- To unsubsc

Re: Parsing really large sgml files

2004-08-27 Thread Kevin Old
erl.org/> <http://learn.perl.org/first-response> > > J, Have a look at http://perl-xml.sourceforge.net/faq/ for all the information you need about parsing XML with Perl. It is an introduction to each of the major XML modules with Perl. I recommend using XML::TreeBuilder as I w

Re: Trying to parse XML file

2004-08-23 Thread Kevin Old
#x27;product-updated' and 'product-announced' can be left out of the document. I'd like a way to check and see which ones are present and if so, process each accordingly, as they have different elements in them. Could I use the "findnodes" subroutine you're using ab

Trying to parse XML file

2004-08-23 Thread Kevin Old
arse and xmltreebuild.pl. Any suggestions on how to better do this are greatly appreciated. Thanks, Kevin -- Kevin Old [EMAIL PROTECTED] Critters (DVD) 794043637124 09/07/2004 $14.97 Critters 2 (DVD) 794043637223 09/07/2004 $14.97 Critters 3 (DVD)

Re: weird math

2004-05-28 Thread Kevin Old
; You'll get 3.77. Hope this helps, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: excel

2004-05-22 Thread Kevin Old
t;{SheetCount} , "\n" ; > > > > print "Author :" , $oBook->{Author} , "\n" ; > > > > I > > > > > > > > Thanks > > > > > > > > David > > > > > > > > > > __ > Do you Yahoo!? > Yahoo! Domains Claim yours for only $14.70/year > http://smallbusiness.promotions.yahoo.com/offer -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: form based htaccess logins

2004-05-12 Thread Kevin Old
se modules on CPAN: Apache:AuthCookie Apache::AuthCookieDBI Apache::AuthDBI One of these should do it and should be easy to use. Just read the POD that comes with each. HTH, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: DBD for SQL Server?

2004-05-12 Thread Kevin Old
days and had a developer helping me as I was having trouble getting it interfaced with mod_perl for some weird reason. Long story short mod_perl was only seeing unixODBC (another driver manager) and so I had use unixODBC instead of iODBC. No biggie, it was tracking this down that was the probl

Re: Compress and email file?

2004-04-27 Thread Kevin Old
e MailFile function in the Mail::Sender module. http://search.cpan.org/~jenda/Mail-Sender-0.8.10/Sender.pm#MailFile Hope this helps, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Where do you put your modules?

2004-04-10 Thread Kevin Old
of every program I have I don't do "use lib '/home/kdo/perlmods'; use KOBagOTrix;". Should I just put /home/kdo/perlmods in my @INC on every system? Just wondering how others do it. Thanks, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [

Re: Browsing and capturing with perl in X (mystery solved)

2004-02-24 Thread Kevin Old
On Tue, 2004-02-24 at 15:34, Peter Scott wrote: > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (Kevin Old) writes: > >On Tue, 2004-02-24 at 11:19, Peter Scott wrote: > >> I haven't used these modules, but they look like they'll do the > >>

Re: Browsing and capturing with perl in X

2004-02-24 Thread Kevin Old
PDF with the persons signature that received it showing. Any ideas? Thanks again for your help, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Browsing and capturing with perl in X

2004-02-24 Thread Kevin Old
the results I need, but that sounds tedious. Also, yes, I do realize that those who are requesting this type of solution are bonkers and extremely lazy, but it's what they want. Any suggestions? Thanks, -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROT

Re: HTML::Mason and Dreamweaver

2004-02-09 Thread Kevin Old
Mason related questions to the Mason list at masonhq.com. Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Build multidimensional array from arrays

2004-01-29 Thread Kevin Old
isplayVert, and it would append that to a MDA as a "column". If I sent it to &displayHoriz, it would be appended as a "row". I know this is kind of lazy to format my data before sending it to S::WE, but who can blame meI'm a Perl programmerit's in my blood.

Re: Build multidimensional array from arrays

2004-01-29 Thread Kevin Old
On Thu, 2004-01-29 at 12:34, Jeff 'japhy' Pinyan wrote: > On Jan 29, Kevin Old said: > > >@one = qw(A B C D); > >@two = qw(E F G H); > > > > > >@mda = ( > > [A][E], > > Do you mean [A, E]? > > > [B][F], > >

Build multidimensional array from arrays

2004-01-29 Thread Kevin Old
to look like: @mda = ( [A][E], [B][F], [C][G], [D][H] ); Any ideas? Sorry if this is not clear. Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl

Re: using Perl to auto-login to capitalone.com

2004-01-28 Thread Kevin Old
> I'm not sure how much of the above is actually necessary, but those are the pages > that you > go through when manually logging in. That last page is where it starts using > JavaScript to > generate cookies just to make sure that you have JavaScript and cookies enabled

Re: How to put a variable value into a text file

2004-01-25 Thread Kevin Old
;; truncate(FH,tell(FH)) or die "Truncating: $!"; close(FH) or die "Closing: $!"; The idea is that you read the file into an array (each element in the array is a line), modify the lines in the array you'd like to, then "Seek&qu

Benchmark's cmpthese results - how to read

2004-01-25 Thread Kevin Old
0 sys = 5.00 CPU) @ 309749.20/s (n=1548746)' and '( 5.28 usr + 0.00 sys = 5.28 CPU) @ 993059.28/s (n=5243353)'. I assume from the percentage chart that the '309749.20/s' and '993059.28/s' is the Rate, but what does that actually mean? Any help is appreciated,

Re: Backup scheme

2004-01-22 Thread Kevin Old
BETTER path. > > Thankx > > Ned Cunningham > POS Systems Development > Monro Muffler Brake > 200 Holleder Parkway > Rochester, NY 14615 > (585) 647-6400 ext. 310 [EMAIL PROTECTED] -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Microsoft Services for UNIX/LINUX

2004-01-05 Thread Kevin Old
ard Windows command line. SFU has NFS services that you can install and mount your Unix machines. Not sure about running GUI apps, but give it a try. HTH, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTE

Convert letter to phone keypad equivalent

2004-01-02 Thread Kevin Old
just trying to learn other ways of programming/consolidating regexes. Any help is appreciated, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Escape regex harmful characters

2003-12-30 Thread Kevin Old
e interested in the script for generating SpamAssasin rules, let me know and I'll send you a copy. Thanks for any help, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Cosolidate multiple regular expression

2003-12-30 Thread Kevin Old
2\n\\page/\\f0\\fs22\n\\par /migs; # remove first page break This is not so much for laziness, but is more for learning what/how to consolidate. Any suggestions are appreciated. Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands

Re: charting data

2003-12-29 Thread Kevin Old
formats. More info at: http://search.cpan.org/~mverb/GDGraph-1.43/Graph.pm HTH, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Bug reports for standard modules/Net::FTP STOU

2003-12-17 Thread Kevin Old
cker at CPAN - rt.cpan.org or for this project at http://rt.cpan.org/NoAuth/Bugs.html?Dist=libnet It should get to the proper people..it's worked for me in the past. HTH, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional c

RE: How do you build your HTML?

2003-12-15 Thread Kevin Old
Otherwisewhat are you looking for exactly? A WYSIWYG or What you see is > what you get editor? > > -Chris > > > On Monday 15 December 2003 10:57, Kevin Old wrote: > > Hello everyone, > > > > I've been "hand coding" HTML for some time now, but r

How do you build your HTML?

2003-12-15 Thread Kevin Old
I need. Bluefish for instance even generates some HTML that Mozilla won't even interpret. Thoughts, suggestions? Thanks, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Session Management

2003-12-12 Thread Kevin Old
server to write the session files to. It's the easiest and most "portable" I've found. Sorry I didn't get that you wanted portability most of all. HTH, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

Re: Session Management

2003-12-12 Thread Kevin Old
:Request::WithApacheSession module which does all the work for you. It is basically a Mason interface to Apache::Session. I am working on a HOWTO for setting up a basic session with it, as the POD isn't easy to follow. HTH, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e

Re: pick N random lines from a file

2003-12-10 Thread Kevin Old
t; > Could anyone verify if the algorithm is correct? Dave, Yes, your algorithm seems to work. I just made a file with a number (1-20) on each line, then ran it and it seems to work just fine. HTH, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Yahoo! Getter

2003-11-25 Thread Kevin Old
hy donĀ¹t those cows have horns?" > -Mike Topp Why not use the Yahoo! Mail Sucker at: http://freshmeat.net/projects/yosucker/. It's even written in Perl! HTH, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: empty strings vs nulls

2003-11-24 Thread Kevin Old
#string is empty } For a null or undefined value do: if($mystring) { #variable is undefined } the long version is: if($mystring eq undef) { #variable is undefined } HTH, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addit

What is a callback?

2003-11-23 Thread Kevin Old
is? Thanks, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Library to parse mail files

2003-11-21 Thread Kevin Old
der->{from}; find_emails($tmpeml, sub { my $email = pop @_; print $email, "\n"; $email; }); } HTH, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: What is this called: ($myvar->{otherid}) ? 'stringA' : 'stringB';

2003-11-20 Thread Kevin Old
; } >From 'perldoc perlop': Ternary "?:" is the conditional operator, just as in C. It works much like an if-then-else. If the argument before the ? is true, the argu- ment before the : is returned, otherwise the argument after the : is returned. For example:

Re: Www::mechanize https erratic response

2003-11-19 Thread Kevin Old
nce/WWW-Mechanize-0.66/lib/WWW/Mechanize/Examples.pod Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Fedora and Findmodules Script

2003-11-19 Thread Kevin Old
s on your machine? That's what the output was on my Fedora Core before I installed a few modules from CPAN. Other than that, the script runs just fine! Hope this helps, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Mechanize

2003-11-14 Thread Kevin Old
m the POD for WWW::Mechanize: Mech is well suited for use in testing web applications. If you use one of the Test::*, like Test::HTML::Lint modules, you can check the fetched content and use that as input to a test call. use Test::More; like( $a->content(), qr/$expected/, "Got exp

RE: Mechanize

2003-11-14 Thread Kevin Old
http://search.cpan.org/~petdance/WWW-Mechanize-0.66/lib/WWW/Mechanize.pm Also, Randal has a wonderful article on WWW::Mechanize at: http://www.stonehenge.com/merlyn/LinuxMag/col47.html Hope this helps, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additio

Re: peeking at the top or bottom of an array

2003-11-13 Thread Kevin Old
ek" at the first element $lastelement = $array[-1]; # "peek" at the last element Hope this helps, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: regexp matching- real simple!

2003-11-13 Thread Kevin Old
? > TIA > -Nandita Try this: if ( $diff == abs($diff) ) { print "positive"; } Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Mechanize

2003-11-13 Thread Kevin Old
e donethis code works for me: #!/usr/bin/perl # use warnings; use strict; use WWW::Mechanize; my $m = WWW::Mechanize->new; $m->get("https://webproe3.keybank.com/scripts/ndpluginisapi.dll/gtmCmHome/pgAuthorization";); print $m->content(); Hope this helps, Kevin -- Ke

Re: Counting (easy!) - select???

2003-11-13 Thread Kevin Old
On Thu, 2003-11-13 at 09:33, Rob Dixon wrote: > "Bob Showalter" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Christiane Nerz wrote: > > > Kevin Old wrote: > > > ... > > > > select undef, undef, undef, 0.25 or print $_ > &

Re: Counting (easy!)

2003-11-12 Thread Kevin Old
ese might be what you're looking for #!/usr/bin/perl # use warnings; use strict; print "printing 1thru5 with buffering\n"; select undef, undef, undef, 0.25 or print $_ for 1 .. 5; print "\nflush forced\n"; $|++; print "printing 1thru5 without buffering\n"; se

Re: Loggin in from form

2003-11-11 Thread Kevin Old
if they went directly to http://www.domain.com/admin/ they'd get > the standard login popup form the browser. > > Any info would be most appreciated. Have a look at the following on CPAN: http://search.cpan.org/search?query=Apache%3AAuth&mode=module Most are implemented via mod_p

Re: Recursion

2003-11-01 Thread Kevin Old
ou're parsing directories and files, Randal has two awesome columns on this very subject http://www.stonehenge.com/merlyn/LinuxMag/col45.html http://www.stonehenge.com/merlyn/LinuxMag/col46.html Hope this helps, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Data::Dumper->dump()ing a hash?

2003-10-30 Thread Kevin Old
On Thu, 2003-10-30 at 18:09, Kevin Pfeiffer wrote: > In article <[EMAIL PROTECTED]>, Kevin Old > wrote: > [...] > > my %entry; > > > > $entry{"genre"} = "Rock"; > > $entry{"artist"} = "3 Doors Down"; > &g

Re: Data::Dumper->dump()ing a hash?

2003-10-30 Thread Kevin Old
from the Sun"; $entry{"disc"} = "Away from the Sun"; $entry{"file"} = "3dd.mp3"; $entry{"fullpath"} = "/mp3s/3dd"; $Data::Dumper::Purity = 1; print Data::Dumper->Dump( [\%entry], [ '*entry' ] ); #my

Re: Range of dates help needed

2003-10-30 Thread Kevin Old
On Thu, 2003-10-30 at 07:06, Rob Dixon wrote: > Kevin Old" wrote: > > Basically I'd like a hash (or whatever) that looks like this: > > > > %datepairs = ( > > # Saturday to Following Friday > > '10/11/2003' => '10/17/2003',

Range of dates help needed

2003-10-29 Thread Kevin Old
'10/17/2003', '10/18/2003' => '10/24/2003', '10/25/2003' => '10/31/2003', '11/01/2003' => '11/07/2003', '11/08/2003' => '11/14/2003', '11/15/2003' => '11/21/2003', '11/22/2003' => '11/28/2003', ); Can anyone offer suggestions or a more graceful way of doing this? Thanks, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Parsing pipe delimited file

2003-10-21 Thread Kevin Old
On Tue, 2003-10-21 at 16:49, Kevin Pfeiffer wrote: > In article <[EMAIL PROTECTED]>, Kevin Old wrote: > [...] > > I need to parse the following data: > > > > "COUNTRY MUSIC HALL OF FAME UPC#: 0-84296-22922-2"||"COUNTRY FEMALE > > PARTY SONGS

Re: Parsing pipe delimited file

2003-10-21 Thread Kevin Old
On Tue, 2003-10-21 at 13:54, Rob Dixon wrote: > Kevin Old wrote: > > > > Thanks to everyone who helped with my last problem last week. I've hit > > a snag in another problem this week. > > > > I need to parse the following data: > > [snip] > >

Parsing pipe delimited file

2003-10-21 Thread Kevin Old
BY KEITH Now, let me explain the data. There are 3 albums here. The titles and UPC's are in the first line. I have a loop that separates the title and the piece of the UPC that I need and puts it into a hash. my %titles = (); while() { my @songs; my @artist; my @line = split/\|/,$_; foreach ($line[0], $line[6], $line[12]) { if($_ $_ =~ s/"//g; $_ =~ /^(.*?)\s+UPC#:\s+0-84296-(\d+)-\d/g; my $title = $1; my $upc = $2; $titles{$upc}{title} = $title; } } Then the rest of the lines are "Tracks" and "Artists". What I need to do is get the appropriate tracks and artists in respective (@tracks, @artists) arrays inside the hash. Basically, I need to know how to write code that does this: Get the 3 albums to be processed, put title in hash with UPC as key (done with code above) Parse next 16 lines (3 tracks and artists on each line) and associate them with the proper song & artist arrays in the hash. I know this is rather confusing, but any help is appreciated! Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Split multidimensional array into 4 multidimensional arrays

2003-10-17 Thread Kevin Old
On Thu, 2003-10-16 at 17:53, James Edward Gray II wrote: > On Thursday, October 16, 2003, at 03:25 PM, Kevin Old wrote: > > > James, is it possible to ask for a little more help with this? > > Nope, you've used up all your free answer tokens.Oh, > alright, just

Re: Description Search

2003-10-17 Thread Kevin Old
r is "0-832450-12345-9" and theirs is "12345". 12345 is contained in both and can be obtained from the first with a simple regular expression. Also, any similarities in any piece of the data would help solve this, if there are any to point out. Hope this helps, Kevin -- Kevin

Re: Split multidimensional array into 4 multidimensional arrays

2003-10-16 Thread Kevin Old
On Thu, 2003-10-16 at 11:52, James Edward Gray II wrote: > On Thursday, October 16, 2003, at 09:16 AM, Kevin Old wrote: > > > James, > > > > On Wed, 2003-10-15 at 22:42, James Edward Gray II wrote: > > > >> Now, if you meant a boring two-dimensional table

Re: Split multidimensional array into 4 multidimensional arrays

2003-10-16 Thread Kevin Old
ot man! I just packed my copy of Programming Perl > to move and I'm very emotional over it!!! :D I treasure it too. I wasn't doubting it's code, it was MY code I was questioning. Thanks for all you're help! Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Split multidimensional array into 4 multidimensional arrays

2003-10-15 Thread Kevin Old
On Wed, 2003-10-15 at 17:43, James Edward Gray II wrote: > On Wednesday, October 15, 2003, at 04:23 PM, Kevin Old wrote: > > > Hello everyone, > > > > I have a multidimensional array that I need to split into 4 > > multidimensional arrays. I've tried the exa

Split multidimensional array into 4 multidimensional arrays

2003-10-15 Thread Kevin Old
]; } } print @newAoA; The error I got is: Can't use string ("5") as an ARRAY ref while "strict refs" in use at ./splice.pl line 16. Any ideas? Thanks in advance for any help! -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: grep argument list too long...how to get around it?

2003-10-10 Thread Kevin Old
On Fri, 2003-10-10 at 11:46, Steve Grazzini wrote: > On Fri, Oct 10, 2003 at 09:35:25AM -0400, Kevin Old wrote: > > On Fri, 2003-10-10 at 02:44, Steve Grazzini wrote: > > > On Thu, Oct 09, 2003 at 12:21:57PM -0400, Kevin Old wrote: > > > > Are you sure about using ls

Re: grep argument list too long...how to get around it?

2003-10-10 Thread Kevin Old
On Fri, 2003-10-10 at 02:44, Steve Grazzini wrote: > On Thu, Oct 09, 2003 at 12:21:57PM -0400, Kevin Old wrote: > > Are you sure about using ls? We have directory here that has several > > thousand files in it and when doing an ls *.whatever-extension we always > > get an &q

RE: grep argument list too long...how to get around it?

2003-10-09 Thread Kevin Old
ep() combo to grep the contents. But the same principle applies. > > Just make sure the barracuda folks says thanks for fixing their problem :) Yeah, we're hoping for a few months of service for free.:) This was also a personal quest to find the answer for myself. So either way I win. Thanks for your help, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

grep argument list too long...how to get around it?

2003-10-09 Thread Kevin Old
27;re probably not aware of it yet as we just got the firmware update the other day. I'm a perl programmer so I thought I'd try to figure out the solution and send it to them to incorporate into the firmware. Any ideas? Thanks, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- T

What is hash randomization in 5.8.1?

2003-10-08 Thread Kevin Old
weekly perl5-porters summary. Thanks, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: M$ excel creation

2003-10-07 Thread Kevin Old
ather than creating loops to write your cells. Hope this helps, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Regex apps

2003-10-07 Thread Kevin Old
mbled upon RegExplorer which has a cleaner interface. http://regexplorer.sourceforge.net Both of these apps help you see exactly what your regex is looking for. It helps me a lot as sometimes I'm thinking one thing but doing another with my regex. Hope this helps someone, Kevin -- Kevin Old &l

AS2 to EDI?

2003-10-06 Thread Kevin Old
ing if anyone could offer any pointers on converting the data. I would actually like to build server like this one implemented in Javahttp://www.snapinhipaa.com/ss/. Any help is greatly appreciated. Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: Perl module for process information?

2003-03-25 Thread Kevin Old
Steve, Thanks for your response. On Tue, 2003-03-25 at 12:31, Steve Grazzini wrote: > Kevin Old <[EMAIL PROTECTED]> wrote: > > > > Basically all I do is pipe the input from ps into my perl program, and > > grep for cdlor.but the path to perl has moved (long sto

  1   2   >