RE: who is the method cop?

2002-01-07 Thread Jeff 'japhy' Pinyan
On Jan 7, Gary Hawkins said: >Unbelievably, I'm actually walking around not fully understanding one or more >of these: First, you should read Perl's object documentation. perldoc perlobj perldoc perltoot Those two, at the very least, will help. >Blessed variables A scalar that has been b

RE: who is the method cop?

2002-01-07 Thread Gary Hawkins
Unbelievably, I'm actually walking around not fully understanding one or more of these: Blessed variables Class methods Class variables Classes Fubars Functions Global variables Instance methods Methods Objects Package variables Packages Properties Subroutines Zebras Is there a simple yet compre

RE: rand() function

2002-01-07 Thread Gary Hawkins
> > Is there a statistically better solution for generating random numbers than > > Perl's built in rand() function? I noticed a couple modules on CSPAN, but > > are they any better? I haven't done a true test of the spread > regular rand() > > gives, but it seems to me to give numbers closer to t

Re: Password ---- cgi-perl-html

2002-01-07 Thread victor
actually, most likely you are looking not just password checking but also session management. The easiest way is to take advantage of mod_auth which come with apache by default (consult this part of the apache faq for more detail http://httpd.apache.org/docs/misc/FAQ.html#user-authentication) o

Re: Password ---- cgi-perl-html

2002-01-07 Thread Eric
if you're running Apache, look into .htaccess for password protecting certain parts of your site.. no reason to make something harder than it has to be. ~Eric On Monday, January 7, 2002, at 07:58 PM, Luinrandir Hernson wrote: > ect part of my website. > I have the password -- To unsubscri

Password ---- cgi-perl-html

2002-01-07 Thread Luinrandir Hernson
I am trying to password protect part of my website. I have the password page done. But how to I make the pages protected so you have to go through the password page? Do i do it by passing hidden inputs from page to page? How do I force people coming in around the password page to go through the

Re: how to change directory in AIX in Perl ?

2002-01-07 Thread Jeff 'japhy' Pinyan
On Jan 7, Families Laws said: >I tried to do a change directory and then do a tar of >the directory: Use the chdir() function. > system("cd /usr/apps"); That creates a new shell, exectes 'cd /usr/apps', and then closes the shell. End result: you've moved nowhere. -- Jeff "japhy" Pinyan

how to change directory in AIX in Perl ?

2002-01-07 Thread Families Laws
I tried to do a change directory and then do a tar of the directory: My program: system("cd /usr/apps"); system("tar -cf tarfile.tar DDA/*"); It looks like the cd command does not work ? Thanks in advance. __ Do You Yahoo!? Send FREE video

Re: CGI perl html urgent

2002-01-07 Thread Bud Rogers
Prahlad Vaidyanathan wrote: > Does emacs do syntax highlighting ? I've been using Vim for a very > long time now, but last time I checked Emacs didn't do it. Xemacs does. IMO not as good as Vim, but very good nonetheless. It's been a very long time since I used Emacs, but I'm pretty sure it d

Re: date compare problems

2002-01-07 Thread John W. Krahn
"John W. Krahn" wrote: > > #!/usr/bin/perl -w > use strict; > > # Get the mtime from two files > my $date1 = (stat $file)[9]; > my $date2 = (stat 'zzp2.txt')[9]; > > print scalar $date1, ' ', scalar $date2, "\n"; Sorry, I was typing too fast. This line should be: print scalar localtime($da

Re: rand() function

2002-01-07 Thread John W. Krahn
Robert Howard wrote: > > Is there a statistically better solution for generating random numbers than > Perl's built in rand() function? I noticed a couple modules on CSPAN, but > are they any better? I haven't done a true test of the spread regular rand() > gives, but it seems to me to give numbe

RE: global substitution

2002-01-07 Thread Scott
At 05:01 PM 1/7/2002 -0500, Jeff 'japhy' Pinyan wrote: >Anyway, you want s/[.:-]+//g, or something to that effect. Be warned, >though, that [.-:] is NOT what you want, since that means "characters from >'.' to '-'", which is the following list: > . / 0 1 2 3 4 5 6 7 8 9 : And that was my newbi

A tk question

2002-01-07 Thread Murzc
I have a TK issue. This code creates the initial TK box. >> use vars qw/$TOP/; >> $TOP = Tk::MainWindow->new; >> $TOP->title('blah blah'); >> $TOP->configure(-background => lc('PeachPuff1')); etc.(a lot more code) When the user clicks the button of his choice, the TK box disappears into

Re: who is the method cop?

2002-01-07 Thread Skip Montanaro
Jonathan> To make this clear, in Perl OOP you use: Jonathan> Packages as classes. Jonathan> Subroutines as instance methods/class methods. Jonathan> Package variables for class variables. Jonathan> Blessed variables for object instances. Thanks, this is the correspondence I

RE: global substitution

2002-01-07 Thread Jeff 'japhy' Pinyan
On Jan 7, Scott said: >At 04:12 PM 1/7/2002 -0500, Jeff 'japhy' Pinyan wrote: >> >>So s/[.-]+//g, or perhaps tr/.-//d; >> >I might have worded it wrong, I need to replace a period (.) and a dash >> >(-), they may not be together ie (.-), they could be in any of the >> >fields in the array. Some

RE: global substitution

2002-01-07 Thread Scott
At 04:12 PM 1/7/2002 -0500, Jeff 'japhy' Pinyan wrote: > >>So s/[.-]+//g, or perhaps tr/.-//d; > >I might have worded it wrong, I need to replace a period (.) and a dash > >(-), they may not be together ie (.-), they could be in any of the > >fields in the array. Some of the fields are numbers (5

RE: rand() function

2002-01-07 Thread McCollum, Frank
I did a random sampling of 10,000 random numbers in two separate groups : for (0..1) { print rand()."\n" } It seemed to consistently revert towards a mean of 0.50 (i.e. results(1) = 0.503; results(2) = 0.498). I also broke those into groups of 100 and seemed to get the same results. That

Re: CGI::FastTemplate confusion

2002-01-07 Thread webmaster
Hello Peter et al, >>This probably should be addressed to [EMAIL PROTECTED], but since I >>think I can help, here goes. Sorry about that; I thought about it only after hitting send. >You need to use the assign method before the parse. tpl->assign($hashref) >This method expects a hasref as an

Re: CGI::FastTemplate confusion

2002-01-07 Thread Jeff 'japhy' Pinyan
On Jan 7, [EMAIL PROTECTED] said: >1) Created an HTML template file which contains HTML code (of course) and >the names of variables that are populated in my script. For example, if >the following line is in my template file: > >Hello $name > >Then somewhere in my perl script, you will find: > >

Re: CGI::FastTemplate confusion

2002-01-07 Thread Peter Cline
At 04:36 PM 1/7/02 -0500, you wrote: >Hello all, > >I've just begun to use CGI::FastTemplate and I get the feeling I am >misunderstanding >something. I have read the perldoc repeatedly, but I guess it's just not >sinking in. If anyone can lend some insight, it would be much appreciated. > >I ha

CGI::FastTemplate confusion

2002-01-07 Thread webmaster
Hello all, I've just begun to use CGI::FastTemplate and I get the feeling I am misunderstanding something. I have read the perldoc repeatedly, but I guess it's just not sinking in. If anyone can lend some insight, it would be much appreciated. I have done the following: 1) Created an HTML tem

rand() function

2002-01-07 Thread Robert Howard
Is there a statistically better solution for generating random numbers than Perl's built in rand() function? I noticed a couple modules on CSPAN, but are they any better? I haven't done a true test of the spread regular rand() gives, but it seems to me to give numbers closer to the top of the rang

RE: global substitution

2002-01-07 Thread Jeff 'japhy' Pinyan
On Jan 7, McCollum, Frank said: >so, if a character is inside of square brackets [], then perl recognizes >that it is part of a character class and never uses it as a quantifier or >special character?? Very few characters need escaping a char class. ] does (unless it's the first character of th

RE: global substitution

2002-01-07 Thread Jeff 'japhy' Pinyan
On Jan 7, Scott said: >At 04:04 PM 1/7/2002 -0500, Jeff 'japhy' Pinyan wrote: >>No, the [...] is needed. Otherwise, you're removing all occurrences of >>the string ".-" which is not what was intended. >> >>So s/[.-]+//g, or perhaps tr/.-//d; > >I might have worded it wrong, I need to replace a p

RE: global substitution

2002-01-07 Thread McCollum, Frank
so, if a character is inside of square brackets [], then perl recognizes that it is part of a character class and never uses it as a quantifier or special character?? -Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]] Sent: Monday, January 07, 2002 4:04 PM To: McCollu

RE: global substitution

2002-01-07 Thread Scott
At 04:04 PM 1/7/2002 -0500, Jeff 'japhy' Pinyan wrote: >No, the [...] is needed. Otherwise, you're removing all occurrences of >the string ".-" which is not what was intended. > >So s/[.-]+//g, or perhaps tr/.-//d; I might have worded it wrong, I need to replace a period (.) and a dash (-), the

Re: global substitution

2002-01-07 Thread Jose Vicente
I think: foreach $value(@fields) { $value = s/\.\-//g; } - Original Message - From: "Scott" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 07, 2002 4:02 PM Subject: global substitution > Hi all: > > I have two files that I am reading into an array, I want to substi

RE: global substitution

2002-01-07 Thread Jeff 'japhy' Pinyan
On Jan 7, McCollum, Frank said: >$record =~ s/[\.\-]//g; Neither of those two slashes are needed. >if it is a '.' or a '-' replace it with nothing. >Actually, I don't even think the [] is necessary, so it could just be: >$record =~ s/\.\-//g; No, the [...] is needed. Otherwise, you're removin

RE: global substitution

2002-01-07 Thread McCollum, Frank
$record =~ s/[\.\-]//g; if it is a '.' or a '-' replace it with nothing. Actually, I don't even think the [] is necessary, so it could just be: $record =~ s/\.\-//g; -Original Message- From: Scott [mailto:[EMAIL PROTECTED]] Sent: Monday, January 07, 2002 4:02 PM To: [EMAIL PROTECTED] Su

global substitution

2002-01-07 Thread Scott
Hi all: I have two files that I am reading into an array, I want to substitute a period and a dash, actually I want to remove them completely. Here is my code: while (my $record = ){ my $policies = ; my @fields = split( /\t/, $record ); my @policies = split( /\t/, $policies ); When I need a r

About DBD-ODBC Module

2002-01-07 Thread Jose Vicente
I can't install the module because I get some errors, when I read README file i find this: BUILDING: set-up these environment variables: DBI_DSN The dbi data source, e.g. 'dbi:ODBC:YOUR_DSN_HERE' DBI_USER The username to use to connect to the database DBI_PASS The userna

Re: who is the method cop?

2002-01-07 Thread Michael Fowler
On Mon, Jan 07, 2002 at 12:27:26PM -0600, Skip Montanaro wrote: > I understand the assignment to $self and $class. What I don't understand is > how new and flush_buffer are associated with a specific class. For example, > is there anything that keeps me from calling flush_buffer with an instance

PerlEz question

2002-01-07 Thread SathishDuraisamy
This is more like a non-PERL question...but since it involves PerlEz.dll I am addressing this mailing-list :-) I need to have my servlets invoke a PERL subroutine through PerlEz.dll (using JNI) on the web server side. The PERL subroutine may take few seconds to perform its job. PerlEz document

Re: substitute all non-digits with ''. I think I saw this postedrec ently, but I could not find it...

2002-01-07 Thread John W. Krahn
Wagner-David wrote: > > Might be faster and easier to use tr: > > tr/0-9//c ; # take complement of what is in string1 and replace w/ >string2(null in this case) This will replace the complement of 0-9 with the complement of 0-9. It doesn't change the original string at all. Y

Fw: substitute all non-digits with ''. I think I saw this posted rec ently, but I could not find it...

2002-01-07 Thread Tanton Gibbs
- Original Message - From: "Tanton Gibbs" <[EMAIL PROTECTED]> To: "Tanton Gibbs" <[EMAIL PROTECTED]> Sent: Monday, January 07, 2002 3:06 PM Subject: Re: substitute all non-digits with ''. I think I saw this posted rec ently, but I could not find it... > oops :) forgot the c on my tr >

Re: Stripping records

2002-01-07 Thread Jonathan E. Paton
> Hi: > > I have a file that contains a header row, I want to > remove the first line and start processing on the second > line. Would you recommend using seek to scan for the > last word in the first line? Another solution is: # Skip over line 1, adds overhead to all iterations though. while (

Re: substitute all non-digits with ''. I think I saw this posted rec ently, but I could not find it...

2002-01-07 Thread John W. Krahn
Tanton Gibbs wrote: > > From: "McCollum, Frank" <[EMAIL PROTECTED]> > > > > I want to take all non-digits and drop them out of my > > string. I would think it would be something like... > > > > s/!(\d+)//; but this is not the case > \D means anything that is not a digit, so > > $str = "AB123CD

RE: substitute all non-digits with ''. I think I saw this posted rec ently, but I could not find it...

2002-01-07 Thread Wagner-David
Might be faster and easier to use tr: tr/0-9//c ; # take complement of what is in string1 and replace w/ string2(null in this case) Wags ;) -Original Message- From: McCollum, Frank [mailto:[EMAIL PROTECTED]] Sent: Monday, January 07, 2002 11:53 To: [EMAIL PROTEC

Re: Stripping records

2002-01-07 Thread John W. Krahn
Scott wrote: > > Hi: Hello, > I have a file that contains a header row, I want to remove the first line > and start processing > on the second line. Would you recommend using seek to scan for the last > word in the first line? open FILE, $file or die "Cannot open $file: $!"; ; # read first

RE: substitute all non-digits with ''. I think I saw this posted recently, but I could not find it...

2002-01-07 Thread McCollum, Frank
Aha. That is very familiar. Thx. -Original Message- From: Tanton Gibbs [mailto:[EMAIL PROTECTED]] Sent: Monday, January 07, 2002 2:54 PM To: McCollum, Frank; [EMAIL PROTECTED] Subject: Re: substitute all non-digits with ''. I think I saw this posted rec ently, but I could not find it...

Re: substitute all non-digits with ''. I think I saw this posted rec ently, but I could not find it...

2002-01-07 Thread Tanton Gibbs
\D means anything that is not a digit, so $str = "AB123CD"; $str =~ s/\D//g; will work. Also, you could use tr $str =~ tr/0-9//d; - Original Message - From: "McCollum, Frank" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 07, 2002 2:52 PM Subject: substitute all non-

RE: your my last hope on this cgi programming question

2002-01-07 Thread Alan C.
Hi, http://www.delphiforums.com/ I originally discovered the follows site from being a member at above site. I'm a member at above of which I can first log on there which then entitles me to freely travel/navigate follows/next site without logged on to above, membership (free) perl.about.com

RE: Stripping records

2002-01-07 Thread Wagner-David
If straight text, then could just read the first line and start on the second: my $MyHdrLine = ; # get first line WHILE ( ) { } You have bypassed first line(has carriage return still with it. Now you start your processing. Wags ;) -Original M

substitute all non-digits with ''. I think I saw this posted recently, but I could not find it...

2002-01-07 Thread McCollum, Frank
I want to take all non-digits and drop them out of my string. I would think it would be something like... s/!(\d+)//; but this is not the case Frank McCollum Bank Of America Securities, LLC [EMAIL PROTECTED] (704) 388-8894 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional command

Stripping records

2002-01-07 Thread Scott
Hi: I have a file that contains a header row, I want to remove the first line and start processing on the second line. Would you recommend using seek to scan for the last word in the first line? Thanks, -Scott -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [

Re: CGI perl html urgent

2002-01-07 Thread Prahlad Vaidyanathan
Hi, On Sun, 06 Jan 2002 Brett W. McCoy spewed into the ether: [-- snip --] > You shouldn't use WordPad for writing Perl code (or any kind of code), you > should get some kind of programmer's editor that can do syntax > highlighting and has some kind of smarts about the syntax of the language > yo

RE: perl sleep

2002-01-07 Thread Scott
Thank you to everyone for the help. I think the timer should be easy enough to implement in perl. My concern was memory usage with the NT task scheduler and would rather have perl do the chore. At 06:52 PM 1/7/2002 +, Stout, Joel R wrote: >I used to do this with NT Scheduler (if you have t

Perl2Exe (or Compiled Perl) and Shipping Runnable Source

2002-01-07 Thread Morbus Iff
Hey all, To summarize, my impresssion of people's hatred of Perl2Exe or generically, compiled ("hidden source") perl is: - it hides the source from the user. this goes against Perl, and you really should be using another language if you want to be such a Nazi. I totally agree with thi

Re: who is the method cop?

2002-01-07 Thread Peter Scott
At 01:02 PM 1/7/02 -0600, Skip Montanaro wrote: >>> I understand the assignment to $self and $class. What I don't > >> understand is how new and flush_buffer are associated with a specific > >> class. For example, is there anything that keeps me from calling > >> flush_buffer wit

Re: date compare problems

2002-01-07 Thread Matt C.
It looks very much like you've not installed the Date::Manip module on your system. Have you? If not try this at the command-line: perl -MCPAN -eshell then tell it: install Date::Manip And watch it roll. You may need your sys admin to run 'make install' on it, however. In fact, you may wa

Re: Threads

2002-01-07 Thread Mark Maunder
RAHUL SHARMA wrote: > Can anyone please help me if I can use threads in perl; > > If yes then what all library files I have to include. > > Thanks, > > Rahul. Perl supports threads, but it's not mature technology yet. You may need to compile your own version of Perl as the default install doesn'

RE: perl sleep

2002-01-07 Thread Stout, Joel R
Here a little daemon that runs my Perl FTP program with different job cards. It runs every 5 minutes. #!/usr/bin/perl -w use strict; use POSIX; # Start the loop for the daemon while(1) { my(@now) = localtime(); my($today) = POSIX::strftime( "%m/%d/%Y", @now); my($ti

Re: who is the method cop?

2002-01-07 Thread Jonathan E. Paton
> I'm trying to figure out Perl's object-oriented features. > I'm a long-time Python Programmer, so I'm well-versed in > its notion of OO programming, but Perl's method > definition stuff seems a bit "loose". All of my Perl > programming is in a Mason context, so that's where I'll > pull an exam

RE: perl sleep

2002-01-07 Thread Tisdel, Matthew
This used to be the method that MRTG used on a NT machine. The newer versions do not do this, so you will have to find older versions with docs that tell you how to do it. Actually, I remember there being an NT script, or little Perl program that added all of this for you. I got the following from

Re: who is the method cop?

2002-01-07 Thread Peter Scott
At 12:27 PM 1/7/02 -0600, Skip Montanaro wrote: >I'm trying to figure out Perl's object-oriented features. I'm a long-time >Python programmer, so I'm well-versed in its notion of OO programming, but >Perl's method definition stuff seems a bit "loose". Yes, we like it that way :-) >sub ne

perl sleep

2002-01-07 Thread Scott
I have been asked to rewrite a ftp process in perl on Win32. The program will scan a directory every five minutes and if a file exists, it will ftp the file to a server. My question is, has any had an experience using the Windows Task Scheduler to do a every 5 minute process or do you think it

RE: EXCEL automation

2002-01-07 Thread Stout, Joel R
Not sure, but if you go to Window -> Unhide you can see that the book was created successfully. Maybe a Win32 Perl Guru can help more. Joel > -Original Message- > From: Billie [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 07, 2002 7:15 AM > To: [EMAIL PROTECTED] > Subject: EXCEL au

who is the method cop?

2002-01-07 Thread Skip Montanaro
I'm trying to figure out Perl's object-oriented features. I'm a long-time Python programmer, so I'm well-versed in its notion of OO programming, but Perl's method definition stuff seems a bit "loose". All of my Perl programming is in a Mason context, so that's where I'll pull an example. Let's

Re: SubRoutine Help

2002-01-07 Thread Michael R. Wolf
[EMAIL PROTECTED] (John W. Krahn) writes: > "Michael R. Wolf" wrote: [buggy code deleted ...] > $ perl -le' > @fred = qw(1 3 5 7 9); > sub total { > my $sum; > $sum += $_ foreach (@_); > } # undef from final foreach always returned > print total( @fred ); > ' > My ba

Re: Variable interpolation?

2002-01-07 Thread Mad B . Jones
06/01/02 17:20:37, Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> a écrit: >The contents of @string are raw text. You'll need to expand the variables >in it manually: > > perldoc -q 'expand variables' > >That FAQ will tell you what to do. Thanks, Jeff, for taking the time to answer. My problem was,

RE: EXCEL automation

2002-01-07 Thread Ryan Guy
Maybe youre just a wuss. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: date compare problems

2002-01-07 Thread John W. Krahn
Alex Harris wrote: > > Ok so I'm REALLY REALLY a newbie and this next question is going to sound > like "where's the spoon" so you can feed me but... > Here's my code and the error I got. I know it means I'm suppose to include > something but I'm not sure what. You are making this _way_ too com

Re: comparing dates

2002-01-07 Thread John W. Krahn
Alex Harris wrote: > > if I use the following to get the date of a file: > use File::stat; > use Time::localtime; > $date_string = ctime(stat($file)->mtime); > print "file $file updated at $date_string\n"; > > I get: >Mon Jan 7 10:21:21 2002 > > Now I want to compare anothe

RE: date compare problems

2002-01-07 Thread McCollum, Frank
the &ParseDate, and &Date_Cmp are looking for subroutines that would split the dates up, it appears. So, I would expect your code to include a subroutine similar to this: sub ParseDate { ($month,$day,$year) = split /\//; } but much more detailed to handle different types of date strings. -Frank

RE: date compare problems

2002-01-07 Thread Yacketta, Ronald
sounds like yah need to install the Manip pacakge > -Original Message- > From: Alex Harris [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 07, 2002 12:26 > To: [EMAIL PROTECTED] > Subject: date compare problems > > > > > > Ok so I'm REALLY REALLY a newbie and this next question i

date compare problems

2002-01-07 Thread Alex Harris
Ok so I'm REALLY REALLY a newbie and this next question is going to sound like "where's the spoon" so you can feed me but... Here's my code and the error I got. I know it means I'm suppose to include something but I'm not sure what. use File::stat; use Time::localtime; $date_string =

RE: comparing dates

2002-01-07 Thread Yacketta, Ronald
how about converting the times to epoch time and then compare? have a look at timelocal to convert to epoch time > -Original Message- > From: Alex Harris [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 07, 2002 11:38 > To: [EMAIL PROTECTED] > Subject: comparing dates > > > > >

Re: Searching for a book...

2002-01-07 Thread Stanislav Zahariev
> John Edwards wrote: > i wasn't complaining on the language, i just have > a hard time reading 299 char long lines. Also, perhaps > you saw that i sent a link with many books? > > /Jon > Sorry, I really haven't think about that in the first way.. My english is a disaster... I'm a bulgarian. I'm

Re: comparing dates

2002-01-07 Thread Matt C.
Check out Date::Manip; it can do just about anything you'd need to do with dates. If speed is of great concern (I use Date::Manip and it performs fine), you may be able to find another Date::* module more specifically tuned to your needs. Definitely try Date::Manip first though, as it will work

Re: Searching for a book...

2002-01-07 Thread Jon Molin
John Edwards wrote: > > Try to keep lines shorter? I think Stanislav's post was more than adequate > for the list. Especially as it would appear that English isn't his first > language. i wasn't complaining on the language, i just have a hard time reading 299 char long lines. Also, perhaps you

Re: pattern matching for ip addresses in a text file

2002-01-07 Thread John W. Krahn
Ken Yeo wrote: > > Hi, Hello, > What is the best pattern matching for ip addresses? I tried $var =~ > /\b\d{1-3}\.\d{1-3}\.\d{1-3}\.\d{1-3}\s/ but the {1-3} didn't work, please > advise, TIA! The correct syntax is to use a comma. \d{1,3} John -- use Perl; program fulfillment -- To unsubsc

RE: Searching for a book...

2002-01-07 Thread John Edwards
Try to keep lines shorter? I think Stanislav's post was more than adequate for the list. Especially as it would appear that English isn't his first language. Take a look at the FAQ section 2.3, bullet point 1 and chill out. /John ;) -Original Message- From: Jon Molin [mailto:[EMAIL PROT

comparing dates

2002-01-07 Thread Alex Harris
if I use the following to get the date of a file: use File::stat; use Time::localtime; $date_string = ctime(stat($file)->mtime); print "file $file updated at $date_string\n"; I get: Mon Jan 7 10:21:21 2002 Now I want to compare another file date to this one getting the date

Re: Searching for a book...

2002-01-07 Thread Scott
http://perl.oreilly.com/ At 06:31 PM 1/7/2002 +0200, Stanislav Zahariev wrote: > Hello, > I'm searching for a perl book to buy... But I'm not sure which is the > best, or which are the best. Can you refer me some so I can chose from > them? I know the basic things of perl, if the book

RE: Searching for a book...

2002-01-07 Thread John Edwards
Are you after a reference book? If so I'd suggest the Perl Black Book. It's not your standard reference, more a mixture of reference and cookbook. It explains how functions work by solving a small real life problem using it and is very useful

Re: Searching for a book...

2002-01-07 Thread Jon Molin
Stanislav Zahariev wrote: > > Hello, > I'm searching for a perl book to buy... But I'm not sure which is the best, or >which are the best. Can you refer me some so I can chose from them? I know the basic >things of perl, if the book holds them they must be very detailed. I'm oriented in

Re: Searching for a book...

2002-01-07 Thread Richard S. Crawford
Can't go wrong with the Camel Book: _Programming Perl_, 3rd edition, from O'Reilly publishing. The _Perl Cookbook_, also available from O'Reilly, is also an excellent buy. I have both (in addition to _Learning Perl_, the Llama Book), and between them I am almost always able to get the answer

Searching for a book...

2002-01-07 Thread Stanislav Zahariev
Hello, I'm searching for a perl book to buy... But I'm not sure which is the best, or which are the best. Can you refer me some so I can chose from them? I know the basic things of perl, if the book holds them they must be very detailed. I'm oriented in programming net stuffs with perl.

Re: pattern matching for ip addresses in a text file

2002-01-07 Thread Jeff 'japhy' Pinyan
On Jan 7, Ken Yeo said: >What is the best pattern matching for ip addresses? I tried $var =~ >/\b\d{1-3}\.\d{1-3}\.\d{1-3}\.\d{1-3}\s/ but the {1-3} didn't work, please You want {1,3}, not {1-3}. Also, should that \s be a \b? And be warned that the number 500 matches /\d{1-3}/ without being "l

RE: your my last hope on this cgi programming question

2002-01-07 Thread John Edwards
This should help http://www.freewebspace.net/search/advanced.shtml -Original Message- From: Hockey List [mailto:[EMAIL PROTECTED]] Sent: 07 January 2002 16:02 To: Alfred Wheeler Cc: [EMAIL PROTECTED] Subject: Re: your my last hope on this cgi programming question Yeh, I saw that site l

Re: your my last hope on this cgi programming question

2002-01-07 Thread Hockey List
Yeh, I saw that site last night. Check this out.. Want to see something funny? Go to that site, www.myCGIserver right? click on sign up and read the warning: "Please note that this service DOES NOT SUPPORT Perl, PHP or other scripting languages!" you gotta love the internet!! -M#39 --- Alfred

Re: your my last hope on this cgi programming question

2002-01-07 Thread Alfred Wheeler
This may help you - http://www.mycgiserver.com/ Hockey List wrote: >thats pretty much the main part of the problem. > >Like I said, Im not afrain of the cgi. Its the fact >that the server wont allow me access to the cgi bin at >all.. > >anyone know a free server for a cgi-bin? > > >--- John Edw

RE: your my last hope on this cgi programming question

2002-01-07 Thread Hockey List
Oh, Ok. Thats about the best news Ive heard yet. Thanks a million! -M#39 --- John Edwards <[EMAIL PROTECTED]> wrote: > You should start out by investigating the CGI.pm > module for Perl. Does your > web host allow Perl scripts and do they have the > CGI.pm module available for > use? > > Once

Re: Parallel::ForkManager

2002-01-07 Thread Randal L. Schwartz
> "James" == James Lucero <[EMAIL PROTECTED]> writes: James> Has anyone successfully used the Parallel::ForkManager James> to download web pages consistently? My series of "Link Checkers" in my columns have had that problem as well. The most recent incarnation does a preforking with a hand-

RE: test and question

2002-01-07 Thread John Edwards
You mean the timestamp on the file? http://www.google.com/search?sourceid=navclient&q=perl+read+file+timestamp To compare dates http://www.google.com/search?sourceid=navclient&q=perl+compare+dates HTH John P.S If you ask a question on the list, you should be prepared for the answer to go bac

pattern matching for ip addresses in a text file

2002-01-07 Thread Ken Yeo
Hi, What is the best pattern matching for ip addresses? I tried $var =~ /\b\d{1-3}\.\d{1-3}\.\d{1-3}\.\d{1-3}\s/ but the {1-3} didn't work, please advise, TIA! Ken Yeo -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Parallel::ForkManager

2002-01-07 Thread James Lucero
Has anyone successfully used the Parallel::ForkManager to download web pages consistently? Ultimately I need to download hundreds/thousands of pages more efficiently. I am having two primary problems, 1) its not very fast for me (although in testing I am only using 3 or 4 urls so far, I can down

test and question

2002-01-07 Thread Alex Harris
I just joined and have a newbie question. How can I read in the date of a file (mmdd) AND then compare that to another date in Perl? I'm running of and AIX Unix machine. Please email me direct at [EMAIL PROTECTED] _ Chat w

RE: your my last hope on this cgi programming question

2002-01-07 Thread Hockey List
thats pretty much the main part of the problem. Like I said, Im not afrain of the cgi. Its the fact that the server wont allow me access to the cgi bin at all.. anyone know a free server for a cgi-bin? --- John Edwards <[EMAIL PROTECTED]> wrote: > You should start out by investigating the CGI.

RE: @$

2002-01-07 Thread John Edwards
It means treat the value in $row as a reference to an array. If you print out $row you will get something that looks like this. ARRAY(0x369ab0) Try altering your code to this foreach $ts ($te->table_states) { print "Table (", join(',', $ts->coords), "):\n"; foreach $row ($ts->rows) {

EXCEL automation

2002-01-07 Thread Billie
Hi all, What's wrong with the following code? use Win32::OLE; $book = Win32::OLE->GetObject("Book1.xls"); $book->Saveas("Book2.xls"); Book1 and the script are in the same directory. When I open Book2.xls, I cannot see any worksheet. Why? Thanks Billie -- To unsubscribe, e-mail: [EMAIL P

RE: your my last hope on this cgi programming question

2002-01-07 Thread John Edwards
You should start out by investigating the CGI.pm module for Perl. Does your web host allow Perl scripts and do they have the CGI.pm module available for use? Once you've got some simple CGI scripts up and running it isn't too hard to do what you are after. You just need to use CGI.pm to display a

@$

2002-01-07 Thread McCollum, Frank
What does the "@$" sign indicate? I have a value in @$row in the code below that I want to strip out any html tags. I tried to use "s/\<*\>//g;" but it gives me an error ("Can't modify array deref in substitution"). foreach $ts ($te->table_states) { print "Table (", join(',', $ts->coords),

your my last hope on this cgi programming question

2002-01-07 Thread Hockey List
I posted this in a perl forum and was told you all might be able to help.. I was hoping you might point me in the right direction on a pretty simple problem. I have spent days just trying to see HOW to get this done, let alone doing it. This seems so damn simply but Im running into a brick wall.

Adobe modules - append/'merge' pdf files

2002-01-07 Thread McCollum, Frank
I would like to move some VB6 modules that 'merge' adobe pdf files together, into Perl. I cannot find anything on this. Does anyone have any experience with this? To everyone who helped me out over the weekend when I thought I destroyed my laptop with the linux install (Especially the little tid

Re: regexp to replace double with single quotes inside html tags

2002-01-07 Thread John W. Krahn
Birgit Kellner wrote: > > --On Sonntag, 06. Jänner 2002 22:48 -0500 "Michael R. Wolf" > <[EMAIL PROTECTED]> wrote: > > > > Which is why many folks use a parser rather than regular > > expressions for this. The parsers take care of the special > > cases that are very, very, very (read the history

Re: Adding quotes to a string variable

2002-01-07 Thread John W. Krahn
Steven Brooks wrote: > > On Monday 07 January 2002 03:16 am, you wrote: > > You have two options: > > > > Option one: Put the string between single quotes $a = '"Test Test Test"'; > > > > Option two: $a = q("Test Test Test"); > > > > Regards > > Robert Graham > > Well, there are other options.

RE: Adding quotes to a string variable

2002-01-07 Thread John
$a = "\"TEST TEST TEST\""; print "$a"; Prints: "TEST TEST TEST" The quotes are part of the string stored in the variable -Original Message- From: Hubert Ian M. Tabug [mailto:[EMAIL PROTECTED]] Sent: Monday, January 07, 2002 3:02 AM To: Perl Subject: Adding quotes to a string variable H

Re: RegEx speed (was: Using regexp to get a substring)

2002-01-07 Thread Jos I. Boumans
if we're talking about optimization and the question was really how to CAPTURE the characters after the last / there is really NO need for a s/// and a simple m// would do which i imagine will also be quite a bit faster regards, jos - Original Message - From: "Gary Hawkins" <[EMAIL PROT

Re: regexp to replace double with single quotes inside html tags

2002-01-07 Thread birgit kellner
--On Sonntag, 06. Jänner 2002 22:48 -0500 "Michael R. Wolf" <[EMAIL PROTECTED]> wrote: > > > Which is why many folks use a parser rather than regular > expressions for this. The parsers take care of the special > cases that are very, very, very (read the history of this > group) difficult to g

  1   2   >