Re: compare dates

2002-05-06 Thread Sean O'Leary
On Mon, 2002-05-06 at 13:53, Lance Prais wrote: > > > Hello, > How do you compare dates to see if dates are "between"? > For example in SQL I would do it like this to find the values between now > and seven days prior:. > X is Between(sysdate-7) and sysdate > Thank you, > Use a Date:: module

RE: ODBC

2002-02-12 Thread Sean O'Leary
At 01:41 PM 2/12/2002, you wrote: >I know there is a Win32::ODBC module, and I think there is a DBI::ODBC? Well, there's DBD::ODBC. DBI is the independent interface, that is, independent of any particular database. On the back end of that, DBD::* modules plug in to provide functionality for e

Re: AARGHHH,..... chdir(yes - no)

2002-02-11 Thread Sean O'Leary
I've been trying to wrap my brain around this for a little while, and I don't think I've been completely successful, but here's my stab at what's wrong. You stated, I think, that line 27 worked and line 29 did not. Line 27 was properly escaped... > 27 #chdir("/Volumes/Music\ Tun

RE: File::Find and Platform Capability

2002-01-30 Thread Sean O'Leary
At 03:15 PM 1/30/2002, you wrote: Always check the return value of system calls to make sure they have succeeded. I think your output file isn't getting opened. >open(OUT, ">docs.out"); should be something like, open OUT, "> docs.out" or die "Can't open output file: $!\n"; This way, if the

Re: Win32 Question - Detecting floppy in drive...

2002-01-29 Thread Sean O'Leary
Wow, a Prodigy email address... I remember using them back in the day. I'm kinda surprised they are still with us. At 12:25 PM 1/28/2002, you wrote: >In VB, I can make an API call (Can't remember what it is off the top of my >head) that will basically look at the drive and detect if I need to p

Re: quick POP3 question

2002-01-29 Thread Sean O'Leary
At 05:55 AM 1/29/2002, you wrote: >I have the Mail::Pop3Client module installed. I have it running with the >debug option on, and it appears to me that the server (pop3.xtra.co.nz) is >accepting the user and password that I send (it says OK please send PASS >command, then OK /USER? is welcome)

Re: newbie DBI

2001-07-27 Thread Sean O'Leary
At 04:54 PM 7/27/2001, you wrote: >On Fri, 27 Jul 2001, Sean O'Leary wrote: > > > ODBC is a low-level API for connecting to databases, and is designed to be > > accessible from many a programming language. To my knowledge, there's no > > module for using

Re: jpg resize

2001-07-27 Thread Sean O'Leary
>I need to resize a slew of jpgs I have in archive. They are 1024x768, way >too big for web viewing. I need them smaller, around 300x200. > >Is there a module I should look into for graphic resizing? Is this >possible with PERL? Where should I go to look at example scripts? PerlMagick rawks.

Re: newbie DBI

2001-07-27 Thread Sean O'Leary
At 01:56 PM 7/27/2001, you wrote: >** Using ActiveState Build 522 (NT) > >I'm trying to decide on using DBI or an ODBC connection for moving data >into or out of MS ACCESS 97 (or 2000) and back into the ACCESS table >[yep, or change inside table]. > >Given I need to perform all the usual extract a

Re: 4 hashes into 1 hash

2001-07-27 Thread Sean O'Leary
At 10:53 AM 7/27/2001, you wrote: >Try: > >my %data = ( %one, %two %three, %four ); This is a good solution, but be careful of one thing. If there are duplicate keys in any of the hashes, the last in will win. Meaning, that if you have a key of 'my key' in %one and in %four, the value of

Re: When to use "my"?

2001-06-15 Thread Sean O'Leary
At 01:51 PM 6/15/2001, you wrote: >It is fairly unperlish to have large blocks of variable declarations at >the top of a subroutine so throw away variables (like a one used only >within a loop) tend to get declared as they are used. The only reason I >can think of that would make it faster is th

Re: counting regex matches

2001-06-14 Thread Sean O'Leary
Oops! Sorry! Wrong section of the documentation. I meant to grab the paragraph a little further down. Still in perlop, still in the Regexp Quote-Like Operators section: The /g modifier specifies global pattern matching--that is, matching as many times as possible within the string. How i

Re: counting regex matches

2001-06-14 Thread Sean O'Leary
At 05:08 PM 6/14/2001, you wrote: >Try: >$result = $string =~ /a/g; >The value will be in $result > >Carl Close. You have to force list context for the result of the pattern match to make it work. Like this: $result = () = $string =~ /a/g; (Thanks to Mark-Jason Dominus) Check out perlop for

Re: This is odd to me

2001-06-13 Thread Sean O'Leary
At 05:32 PM 6/13/2001, you wrote: >I join this group, and I get discussions of regexes and XML, etc. I have >no idea what a regex is! What books have you guys (who I assume are >beginners too, since that's the name of this board) been reading? Turn >me into a beginner too! > >Kirk Despair not.

Re: email on win32

2001-06-08 Thread Sean O'Leary
At 12:38 PM 6/7/2001, you wrote: >Hi, >if I do a search for Mail::Mailer I get back that its available from >http://www.ActiveState.com/packages: >when I do install Mail::Mailer I get the my previous error. > >Strange though, I do 'search Mail' as you suggest - but I do not get the >list you menti

Re: I have no idea why this doesn't work...

2001-06-06 Thread Sean O'Leary
At 04:03 PM 6/6/2001, you wrote: >if (!$ARGV[0]) { > print "Enter the file\(s\) to search: "; > chomp(@files = ); >} >print "*"; >@files = glob($ARGV[0]); Your problem appears to be right here. If the user didn't put the filenames on the command line, then you ask them for them. Then

Re: one last attempt?

2001-06-06 Thread Sean O'Leary
At 09:41 PM 6/5/2001, you wrote: >Well i'm about to chuck perl out the window > >this is the command line from my index.htm file > ^ | No space between the comment tag and the beginning of the directive! I've been bitten by this one. I hope you haven't been tearing your hair ou

Re: transfer files via FTP ????

2001-05-03 Thread Sean O'Leary
At 12:01 PM 5/3/2001, you wrote: >I have looked through the Programming Perl book and tried the system >command. But it only opens the ftp session and waits for input. I also >tried the Net::FTP module. But it displays a warning during >install. Afterwards, it gives me an error when I try

RE: Perl and Microsoft Excel: Can they play together?

2001-05-03 Thread Sean O'Leary
Also, drop by http://search.cpan.org/ It does a body good. : ) You can really easily find many a cool module here. Pertaining to this specific question, you have two things that could be of way-much use. Spreadsheet::ParseExcel Spreadsheet::WriteExcel Just throw Excel into the search box

Re: GD::Graph

2001-05-02 Thread Sean O'Leary
At 06:44 PM 5/2/2001, you wrote: >Can anyone help me understand why the following code is being ignored? > >$my_graph->set_x_label_font(GD::Font->Giant); > >Kevin Need more code! It's like saying "Why doesn't this print?" print 'Print this!'; What I didn't show you was that earlier in my progr

Re: Directory mapping in NT

2001-05-02 Thread Sean O'Leary
At 08:42 AM 5/2/2001, you wrote: > I am working on automating some file imports from a file that are > saved on a server to a database on a local machine. It gets a bit ugly > because we need to run the text file through a conversion program from a > vendor before it gets imported into

Re: eliminating duplicate lines in a file

2001-05-02 Thread Sean O'Leary
At 07:57 AM 5/2/2001, you wrote: >Hi, >Iam reading flat text file of 10 lines. Each line has got data of >maximum 10 characters. >I want to eliminate duplicate lines and blank lines out of that file. >i.e. something like sort -u in unix. > > > >Is there any easy way of doing it in perl??? >th

Re: FTP package

2001-05-02 Thread Sean O'Leary
At 07:07 AM 5/2/2001, you wrote: >I've written a script to FTP files. I've included the Net::FTP package but >when I run the script in 2 different machines, I get these 2 error messages: > >machine 1 >Can't locate object method "new" via package "Net::FTP::A" at >/usr/local/lib/per >l5/5.00503/Net

Re: Perl and NT

2001-05-02 Thread Sean O'Leary
At 03:03 PM 5/1/2001, you wrote: >Does anyone know of a way to use perl and CGI to have the following: > >html page w/ form to get stdin from the user for username and >password.(basic), >pass the variables to the perl script which then modifies permissions for a >specific folder on NT >and allows

Re: writing an array to file

2001-05-01 Thread Sean O'Leary
At 12:28 PM 5/1/2001, you wrote: >sub wanted { > @FILES = (); > if ( $File::Find::name =~ /_boot\.js$/ ) > { >push @FILES, "$File::Find::name\n"; > } > > print (@FILES); > > open(BOOT_FILES,">boot_files.txt"); >

Re: MySQL Blobs DBI & CGI

2001-04-27 Thread Sean O'Leary
At 06:11 AM 4/27/2001, you wrote: >Hi, Hello there. : ) >I have managed to get a blob(a jpeg file) from a local file on the >linux box into the database, but I can't seem to get the thing back >out and onto a webpage! I have scanned numerous lists and books, >but seem to be unable to find any re

Re: missing something obvious [commentary ;O]

2001-04-25 Thread Sean O'Leary
At 02:50 PM 4/25/2001 > > Well, it's not obvious. To tell you honestly, I was initially > > shocked that split didn't complain about the string, demanding a > > pattern instead. > >"split ' '" is a pretty common idiom, though it still confuses me. >I suppose it's hardcoded? Yes. Check the bottom

Re: missing something obvious

2001-04-25 Thread Sean O'Leary
At 01:07 PM 4/25/2001, you wrote: >Such as, for example, if the limit was 4, the fourth variable would >contain the remainder of the string, rather than the fourth part of the >split. > >perldoc -f split(again) > >:-) > >-- >Paul Johnson - [EMAIL PROTECTED] Dude, you're cool. : ) I may not

Re: map a network drive through a perl script

2001-04-25 Thread Sean O'Leary
At 03:06 PM 4/25/2001, you wrote: >Hi, All > >I'm having some trouble mapping a network drive >through my perl script. >the mapping looks like this: > >system ("net use \\mypc\reports"); > >Pls let me know if this is not the correct syntax. > >thanks, > > >= >Peter Lemus '\' is an escape char

Re: Repeated Words

2001-04-25 Thread Sean O'Leary
At 10:48 AM 4/25/2001, you wrote: > > I believe if you add the (g)lobal modifier and optionally(i), Paul's > > line of code may work: > > > > $line =~ /(\b\w+\b).*\1/ogi; You don't need /o, because there are no variables in the pattern, so Perl will compile the regex at compile time anyway. I

Re: missing something obvious

2001-04-25 Thread Sean O'Leary
At 10:48 AM 4/25/2001, you wrote: >Thanks for that Steven, > >I knew it was obvious > >Gary Well, it's not obvious. To tell you honestly, I was initially shocked that split didn't complain about the string, demanding a pattern instead. Then I looked more at and played a bit, and found the Pe

Re: installing Term::ReadKey module on Windows - still [OT]

2001-04-25 Thread Sean O'Leary
Sorry! Bad link in my last post. ( It figures it's the only one I haven't checked all day! ) Anyway, for the Cygwin project, which now appears to be fully subsumed by RedHat, check out: http://sources.redhat.com/ Thank you for your time, Sean.

Re: installing Term::ReadKey module on Windows - wanders [OT]

2001-04-25 Thread Sean O'Leary
At 11:06 PM 4/24/2001, you wrote: >2) Is there a pre-compiled version of this module available? I didn't find >one on CPAN, but perhaps someone has one...? I'm working on a WinME machine, >but I would be happy to try anything compiled on Win95 or up. Just use Perl Package Mmanager, if you have t

Re: Help on lib/modules Please!!

2001-04-24 Thread Sean O'Leary
At 05:08 PM 4/24/2001, you wrote: >I had a pm that used to be working and is called using "use ABC::Test;". I >deleted (for some stupid reasons) the perl directory and didn't realize I >also deleted the ABC subdirectory below site\lib. I took another copy from >another machine and placed it back

Re: sysread and buffering

2001-04-24 Thread Sean O'Leary
At 10:27 AM 4/24/2001, you wrote: >Another possible solution is to use Brian Ingerson's Inline.pm and code >the reads &c. with C's lower level IO. I think a C getc() would do >it > >But be warned that, while it's actually quite friendly, a raw beginner >might have some trouble with the Inline

Re: [BPQ] help!! any idea whats wrong with this??

2001-04-24 Thread Sean O'Leary
At 11:17 AM 4/24/2001, you wrote: >so...this is suposed to count the words in FILE and return how many >occourances of each word there were...its not working for me thoughits >only returning the count for the last word in the file...help > >#!/usr/local/bin/perl > >open (FILE,"../www/main.ph

Re: sysread and buffering

2001-04-23 Thread Sean O'Leary
At 05:25 PM 4/23/2001, Janet Lee wrote: >Hi all. > >I'm trying to do what I think is a very simple thing. I want to read >keyboard input char by char and time the difference between each keystroke. >I've tried using > >while (sysread STDIN, $key, 1) { > dostuff >}; > >but that seems to be

Admin idea

2001-04-23 Thread Sean O'Leary
ning going to know that they have to head their messages a certain way. Thank you for your time, Sean O'Leary

Re: help me understand $_

2001-04-23 Thread Sean O'Leary
At 07:33 PM 4/22/2001, you wrote: >Sean O'Leary -- Damn that was a good explaination! I >felt like I understood $_ very well before, but I >understand it even better now. A very perlish post >indeed. Larry the linguist would be proud! > >Matt Thanks. : ) I'm glad

Re: Perl documentation (Net::DNS::RR::MX)

2001-04-23 Thread Sean O'Leary
At 06:23 PM 4/19/2001, you wrote: >I have a question about the Perl documentation I find on the web that >explains the usage of Perl modules. I come across this situation somewhat >frequently where I need to do something, find a module that can do it, but >just can't figure out from the basic info

Re: Palm OS

2001-04-23 Thread Sean O'Leary
At 02:28 AM 4/23/2001, you wrote: >Hello ! > > >I would like to know if i could develop Palm OS >applications using Perl. >Is there any package out there to do that? >Thanks for your attention. > > >H3li0 The short answer is no. The slightly longer answer is that so far no one has made perl run

Re: help me understand $_

2001-04-22 Thread Sean O'Leary
At 02:47 PM 4/22/2001, you wrote: >i have read about it in 3 books and even used it in scripts i have made >but i still dont truly know how to be sure what $_ contains...can anyone >clear this up for me? Thanks >Chris Brown I think the best way to talk about $_ is to speak about it linguistica

RE: Use Strict

2001-04-20 Thread Sean O'Leary
At 10:57 AM 4/20/2001, you wrote: >Both approaches will work equally well for most general applications. You >start to see differences when you get into more specialized applications. >For example, if you're writing a Perl module, and you want to export >variables using Exporter.pm, you can't use

Re: cat a file

2001-04-19 Thread Sean O'Leary
At 04:27 PM 4/19/2001, you wrote: >Hello, > >I am very new to perl. I have two pst (personal folder files) that I want >to combine into one. > >I know how to use cat in Linux. How do do this >same operation in perl under windows? > >Thank You, > >Frank Drain Well, you could do this: copy infile

Re: Automatically generate html files for ActivePerl

2001-04-19 Thread Sean O'Leary
At 12:06 PM 4/19/2001, you wrote: >How can html help files be generated automatically from the makefile such >that documentation can be installed in ActivePerl with the ppm command ? > >Kind regards, > >Leo De Wael Take a look at Make::Maker, and in the ActiveState documents, ActivePerl-faq2, t

Re: Where do I set global environment variables --Linux

2001-04-19 Thread Sean O'Leary
At 10:47 AM 4/19/2001, you wrote: >This is no doubt a real newbie question. Every time I run perl I get >the following warnings: > >perl: warning: Setting Locale failed. >perl: warning: Please check that your locale settings: > LANGUAGE = "en", > LC_ALL = "en", > LANG = "

Re: Perl FTP question [beginner]

2001-04-19 Thread Sean O'Leary
At 03:33 PM 4/18/2001, you wrote: >Check out my other note about grepping dirs on Win32. The same would apply. >Using File::Find is good if you want all the files from a tree, but if you >just want to read a single dir, and not all of the dirs below it, use >opendir and readdir. Check out perl

Re: Perl FTP question [beginner]

2001-04-18 Thread Sean O'Leary
At 03:08 PM 4/18/2001, you wrote: >I wrote this code to email me attachments of any files found at a certain >ftp site. It works but... since I'm new at Perl I know there's got to be a >better way. In particular the handling the file transfer by parsing out the >output from DIR seems hinky. Le

Re: Directory Grepping WIN32

2001-04-18 Thread Sean O'Leary
At 02:44 PM 4/18/2001, you wrote: >I have their full name and path. The only thing I know is they end with >"09.html". Is perl the right tool to use to find all my 09 files and place >their fully qualified names in a file? > >If I can get all my 09 filenames in a file, reading them in and parsin

Re: problem with variables

2001-04-17 Thread Sean O'Leary
will get assigned to $_ as the foreach loops over it. Then print, conveniently, when not supplied with any arguments will print the contents of $_. You could say: print $_; but saying just 'print;' is the same. Hope this helps. Sean O'Leary BTW - If anyone wants to see th