help on how to construct very specific matches

2001-11-29 Thread Leon
I need members help on this :- I wish to substitute ALL the number 123 marked in red found within the brackets ( 123 of 123 ), of $a, into 789. The regexes must not substitute the 4 following match :- 123 ) 123 of 123 ) 123 of 123 ) Therefore, the regexes MUST ONLY substitute the red 123 found

Problems With Net::Telnet Installation

2001-11-29 Thread Alexis VAILLANT
Hi, I have problems with Net::Telnet installation I try to install it with : perl -MCPAN -e shell or perl Makefile.PL make make test make install i have the following response :: Running install for module Net::Telnet Running make for J/JR/JROGERS/Net-Telnet-3.02.tar.gz CPAN: MD5

RE:Regex problem

2001-11-29 Thread Jorge Goncalvez
Hi, I have this code: $_Globals{IPCONFIG} = "C:/ipconfig.txt"; open (IPCONF,"< $_Globals{IPCONFIG}") or die "je ne peux ouvrir $_Globals{IPCONFIG} :$!"; @ten=; close IPCONF; foreach(@ten){ chomp(); if ($_ =~/Adresse IP/) { $_ =~ s/.+://;

Re: floating point arithmetic

2001-11-29 Thread Jenda Krynicky
> I encountered a problem with floating point arithmetic that I'm afraid > may be causing greater calculation errors in my program. The program > I'm writing calculates numerical solutions for ordinary differential > equations (http://sid.cwru.edu/perl/euler.pl). What's happening is > that floa

frined in ISP

2001-11-29 Thread nafiseh saberi
hi all. I search for one friend that work for ISP that programming in ISP. thx. I am waiting. I am online with [EMAIL PROTECTED] _ Best regards. Nafiseh Saberi www.iraninfocenter.net www.sorna.net Remember that : It is all in GOD's hands ,and He

newlines

2001-11-29 Thread J . D . Gravestock
Anyone know how to get rid of two new lines from one text file before writing to another i.e. line of text line of text I can get rid of one newline with chop but can't think of how to delete two? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTE

RE: a little help in autoincrement IP addresses

2001-11-29 Thread Jorge Goncalvez
I wanted to print this in a file: subnet $var1 netmask 255.255.255.0{range dynamic-bootp $var2 $var3; } $var1,$var2,$var3 are IP adress. I do it and It works but now I wanted to do this: In fact I wanted for exemple:$var2="192.40.54.n" and $var3="192.40.54.n+10" How can I do this in Perl Tha

Re: a little help in autoincrement IP addresses

2001-11-29 Thread nafiseh saberi
#!/usr/bin/perl #print "Content-Type: text_html\n\n"; open (SALARY, "); close (SALARY); $read = join '',@read; $read = $read + 10; open (SALARY, "+ To: <[EMAIL PROTECTED]> Sent: Thursday, November 29, 2001 14:25 PM Subject: RE: a little help in autoincrement IP addresses > I wanted to print t

sendmail in html

2001-11-29 Thread Rahul Garg
hi, well i am trying to send mails thru sendmail in html but they are coming in html with tags and html not getting executed. how should i correct the prob. open (MAIL, "|$mail_prog -t"); print MAIL "To: $r_mailid \n" ; print MAIL "From: $s_mailid \n" ; print MAIL "Subject: $subject \n\n"

Re:2 last number with a regex

2001-11-29 Thread Jorge Goncalvez
How can I check the last 2 number of an IP adress and increment it by 10. for exemple: $IP="192.40.54.41" Th elast 2 number is 41 i increment it by 10. $IP1="192.40.54.51" -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: help on how to construct very specific matches

2001-11-29 Thread Andrea Holstein
Leon wrote: > need members help on this :- > > I wish to substitute ALL the number 123 marked in red found within the brackets ( >123 of 123 ), of $a, into 789. > > The regexes must not substitute the 4 following match :- > 123 ) > 123 > of 123 ) > 123 of 123 ) > > Therefore, the regexes MUST ONL

Re: help on how to construct very specific matches

2001-11-29 Thread John W. Krahn
Leon wrote: > > I need members help on this :- > > I wish to substitute ALL the number 123 marked in red > found within the brackets ( 123 of 123 ), of $a, into 789. > > The regexes must not substitute the 4 following match :- > 123 ) > 123 > of 123 ) > 123 of 123 ) > > Therefore, the regexes

Re: floating point arithmetic

2001-11-29 Thread Andrea Holstein
Sidharth Malhotra wrote: > I encountered a problem with floating point arithmetic that I'm afraid > may be causing greater calculation errors in my program. The program > I'm writing calculates numerical solutions for ordinary differential > equations (http://sid.cwru.edu/perl/euler.pl). What's

Re: First Program ever

2001-11-29 Thread Andrea Holstein
Shane Garza schrieb: > > Not just in perl this is my first program ever. > > I decided to look at perl first while immersed in awe. > > I am posting this code for feedback "and hopefully some positive feedback is > there", I just want to learn ;). So flame away, and try to create the same > lo

Re: sendmail in html

2001-11-29 Thread Jenda Krynicky
From: "Rahul Garg" <[EMAIL PROTECTED]> > well i am trying to send mails thru sendmail in html but they are > coming in html with tags and html not getting executed. how should i > correct the prob. > > open (MAIL, "|$mail_prog -t"); > print MAIL "To: $r_mailid \n" ; > print M

Newbie: Move to next entry

2001-11-29 Thread Mark Smith
Hi all I am try to get my first guestbook to work. I have got it writing to a file, and retrieving,..but only the first entry in the logfile. I have delimited the fields in the logfile by ","..and delimited the last field for each entry with a "*". How do I get it to move to the next entry a

Capturing Output from a program

2001-11-29 Thread Andrew Tait
Hi All, At the moment I am using the system() fuctions to run external commands as follows: print "Run \"userdel -r $arg\" [y/N] "; chop ($answer=); if ($answer =~ /^y/i) { print "Deleting account"; system("userdel -r $arg"); print "Done\n"; } However, if "syste

How do I send a HTML error to a user because he didn't fill in one of the fields via a HTML form?

2001-11-29 Thread JUAN AMORE
$form_data = $ENV{'QUERY_STRING'}; $form_data =~ s/%([\dA-Fa-f][\dA-Fa-f])/pack ("C",hex ($1))/eg; # Replace "+" sign with " "space char. $form_data =~ s/\+/ /g; # Split $form_data into name/value pairs: @fields = split (/&/, $form_data); # Init variables with form data values from following

Re: Capturing Output from a program

2001-11-29 Thread Andrea Holstein
Andrew Tait wrote: > > Hi All, > > At the moment I am using the system() fuctions to run external commands as > follows: > > print "Run \"userdel -r $arg\" [y/N] "; > chop ($answer=); > if ($answer =~ /^y/i) { > print "Deleting account"; > system("userdel -r $arg"); >

Re: newlines

2001-11-29 Thread Carl Rogers
At 10:35 AM 11/29/2001 +, [EMAIL PROTECTED] wrote: >Anyone know how to get rid of two new lines from one text file before >writing to another I'm sorry.I'm not clear as to what you mean. If you're trying to read the lines below, you can change your default record delimiter from a single new

RE: PERL instead of crontab

2001-11-29 Thread Bob Showalter
> -Original Message- > From: nafiseh saberi [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 29, 2001 2:44 AM > To: [EMAIL PROTECTED] > Subject: PERL instead of crontab > > > hi all. > I wish ,all of you be hopefull and happy. > > I write one program for control user in ISP > (in

RE: Problems With Net::Telnet Installation

2001-11-29 Thread Bob Showalter
> -Original Message- > From: Alexis VAILLANT [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 29, 2001 4:14 AM > To: 'perl ' > Subject: Problems With Net::Telnet Installation > > > Hi, > > I have problems with Net::Telnet installation > > I try to install it with : > > perl -M

RE: 2 last number with a regex

2001-11-29 Thread Bob Showalter
> -Original Message- > From: Jorge Goncalvez [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 29, 2001 7:25 AM > To: [EMAIL PROTECTED] > Subject: Re:2 last number with a regex > > > How can I check the last 2 number of an IP adress and > increment it by 10. > for exemple: > $IP="19

RE: a beginners challenge

2001-11-29 Thread Bell, Robert J.
Roiy, I already had something similar. It actually deletes files older than 45 minutes. Just change .03124 to a "3" for 3 days. # For each file in the folder.. while() { # If the file is not a directory, and is older than 45 minutes, delete it if ((!-d $_) && (-M $_ > .03124)) {

RE: Capturing Output from a program

2001-11-29 Thread Bob Showalter
> -Original Message- > From: Andrew Tait [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, November 28, 2001 11:58 PM > To: [EMAIL PROTECTED] > Subject: Capturing Output from a program > > > Hi All, > > At the moment I am using the system() fuctions to run > external commands as > follows:

RE: Capturing Output from a program

2001-11-29 Thread Jenda Krynicky
Another way to run a program and capture the output is to use Shell.pm : use Shell qw(userdel); $output = userdel( '-r', $arg); Jenda === [EMAIL PROTECTED] == http://Jenda.Krynicky.cz == There is a reason for living. There must be. I've seen it somewhere. It's just that in the

RE: newlines

2001-11-29 Thread J . D . Gravestock
This is the program; format ILL = @<< $number .. open (INPUT_FILE, "$DATA_DIR/opacrequests.LN.out") || die "Cannot open $DATA_DIR/opacrequests.LN.out: $!"; open (ILL, ">$OUT_DIR/pobk_rpt.txt") || die "Cannot open $OUT_DIR/pobk_rpt.txt: $!"; while ($_=) { chop $_ ; ($number, $date_time,

RE: newlines

2001-11-29 Thread Bob Showalter
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 29, 2001 9:34 AM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: RE: newlines > > > > This is the program; > > format ILL = > @<< > $number > .. > open (INPUT_FILE, "

Sending mail on a Win32 system.

2001-11-29 Thread Aaron Petry
I've seen all sorts of ways to send mail on a *nix system, but I can't find a good module to use with Win32. Does anyone have any suggestions on how to send an e-mail message on win32 systems? Mail::Sendmail doesn't seem to work. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For add

Re: How do I send a HTML error to a user because he didn't fill in one of the fields via a HTML form?

2001-11-29 Thread Elaine -HFB- Ashton
JUAN AMORE [[EMAIL PROTECTED]] quoth: *>$form_data = $ENV{'QUERY_STRING'}; *> *>$form_data =~ s/%([\dA-Fa-f][\dA-Fa-f])/pack ("C",hex ($1))/eg; do something like unless (param('foo')) { 'print out some HTML here describing the error' exit; } This will check for the parameter you want t

Re: email attachments

2001-11-29 Thread Elaine -HFB- Ashton
Jeff Norville [[EMAIL PROTECTED]] quoth: *>Looked through CPAN but didn't find anything specifically dealing with *>receipt of attachments. *> *>I basically want to parse an attachment for a PGP key. Suggestions? http://search.cpan.org/search?dist=Mail-Audit e. -- To unsubscribe, e-mail: [EMA

Re: Sending mail on a Win32 system.

2001-11-29 Thread Luke Bakken
Mail::Sendmail works fine - perhaps you don't have the SMTP server setting correct or no access to a server? Luke On Thu, 29 Nov 2001, Aaron Petry wrote: > I've seen all sorts of ways to send mail on a *nix system, but I can't > find a good module to use with Win32. Does anyone have any

RE: Sending mail on a Win32 system.

2001-11-29 Thread Fennelly, Marion [ETHGB]
I use this with an Outlook client: use Win32::OLE; $outlook = new Win32::OLE('Outlook.Application'); die "Can't start Outlook: $!" if !defined $outlook; etc etc. > -Original Message- > From: Aaron Petry [mailto:[EMAIL PROTECTED]] > Sent: 29 November 2001 15:15 > To: [EMAIL PROTECTED] >

Elegant way to find/remove line from text file

2001-11-29 Thread Jim Witte
Hello, I'm updating a script that manages the .htpasswd file on *N*X boxes. The user records are stored on successive lines, in the form $username:$password. What I want to do is find a particular $username, then delete the entire line. The current code reads the entire file into an array,

RE: Elegant way to find/remove line from text file

2001-11-29 Thread Bob Showalter
> -Original Message- > From: Jim Witte [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 29, 2001 11:09 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Elegant way to find/remove line from text file > > > Hello, > > I'm updating a script that manages the .htpasswd file on

RE: Sending mail on a Win32 system.

2001-11-29 Thread William . Crain
When I did this, I used the Net:SMTP module that comes with the ActiveState distribution. Of course, you need access to an SMTP server. Otherwise, it was very easy to use. > I've seen all sorts of ways to send mail on a *nix system, but I can't >find a good module to use with Win32. Do

split and replace

2001-11-29 Thread Johnson, Shaunn
Howdy: I must be going about this the wrong way. I'm trying to modify a script and concatenates text files into one large file. That works. There is a part where inside the text file are six columns. The last column is what I need to edit. It's alpha_numerical. I want to edit the sixth colum

Re: split and replace

2001-11-29 Thread Adam Turoff
On Thu, Nov 29, 2001 at 11:53:38AM -0500, Johnson, Shaunn wrote: > [sample] > > 2001q2 06 P92786 IEMMM01 1 6 > 2001q2 06 P92786 IEMMM01 1 8 > 2001q2 06 P56576 IEMFF01 1 23 > > [result] > > 2001q2 06 P92

RE: split and replace

2001-11-29 Thread Bob Showalter
> -Original Message- > From: Adam Turoff [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 29, 2001 12:08 PM > To: Johnson, Shaunn > Cc: [EMAIL PROTECTED] > Subject: Re: split and replace > > ... > s/(\d+)$/sprintf("%02d", $1)/e; That doesn't change 23 to 023. Why not j

RE: split and replace

2001-11-29 Thread Bob Showalter
> -Original Message- > From: Bob Showalter [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 29, 2001 12:12 PM > To: 'Adam Turoff'; Johnson, Shaunn > Cc: [EMAIL PROTECTED] > Subject: RE: split and replace > > > > -Original Message- > > From: Adam Turoff [mailto:[EMAIL PROTECT

Re: Sorting a Hash

2001-11-29 Thread Scott R. Godin
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Dale Pellerin) wrote: > I am very new to hashes (as well as Perl) and am having some difficulty with > a cgi script. This script allows individuals to post "announcements" via a > form. The form data is stored in a text file, sorted in descen

RE: split and replace

2001-11-29 Thread Johnson, Shaunn
--Howdy all: --I *DO* want to replace every occurance of each value in the last column with a zero before it ... not just a single diget. -X > -Original Message- > From: Bob Showalter [mailto:[EMAIL PROTECTED]] > > > > -Original Message- > > From: Adam Turoff [mailto:[EMAIL PR

[Bob_Showalter@taylorwhite.com: RE: Elegant way to find/remove line from text file]

2001-11-29 Thread Bkwyrm
Tested these in order to learn how they work, and the first one simply deleted the entire contents my test file which was peppered with foo on multiple (but not all) lines - Forwarded message from Bob Showalter <[EMAIL PROTECTED]> - Second, the canonical one-liner to delete lines f

Elegant way to find/remove line from text file - REDUX

2001-11-29 Thread Bkwyrm
> perl -ni -e 'next unless /foo/' myfile.txt Actually, finally got this to work this way to remove all lines but those containing foo: perl -ni -e 'next unless /foo/; print;' myfile.txt and this way for all those not containing foo: perl -ni -e 'next if /foo/; print;' myfile.txt -- Na

RE: [Bob_Showalter@taylorwhite.com: RE: Elegant way to find/remove line from text file]

2001-11-29 Thread Bob Showalter
> -Original Message- > From: Bkwyrm [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 29, 2001 12:22 PM > To: [EMAIL PROTECTED] > Subject: [[EMAIL PROTECTED]: RE: Elegant way to > find/remove > line from text file] > > > Tested these in order to learn how they work, and the first >

Weekly list FAQ posting

2001-11-29 Thread casey
NAME beginners-faq - FAQ for the beginners mailing list 1 - Administriva 1.1 - I'm not subscribed - how do I subscribe? Send mail to <[EMAIL PROTECTED]> You can also specify your subscription email address by sending email to (assuming [EMAIL PROTECTED] is your email address)

RE: split and replace

2001-11-29 Thread Johnson, Shaunn
--Howdy: --This is what I wound up using: [example] open (FILE, "+) { s/(\d+)$/0$1/; print; } close FILE [/example] --The interesting thing is that if I have a decimal in there, it puts the zero in front of the decimal, but not the whole number. I'm not sure why, but for now

press return to continue

2001-11-29 Thread Peter Lemus
greedings.. How can I get my script to interact with the user to press return to continue or cntl-c to stop? thanks in advance. = Peter Lemus UNIX/NT Networks Engineer [EMAIL PROTECTED] --The universe is way too big for us to be alone; the real question is; who is out-there, besides u

Re: press return to continue

2001-11-29 Thread A. Rivera
print "Press Return to continue or Control-C to stop."; $input = ; Is this what you needed? Agustin - Original Message - From: "Peter Lemus" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, November 29, 2001 9:38 AM Subject: press return to continue > greedings.. > > How ca

Re: Elegant way to find/remove line from text file - REDUX

2001-11-29 Thread A. Rivera
Wouldn't cat filename | grep -v "text to ignore" be simplest? Agustin - Original Message - From: "Jim Witte" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, November 29, 2001 8:09 AM Subject: Elegant way to find/remove line from text file > Hello, >

Re: press return to continue

2001-11-29 Thread Michael D. Risser
On Thursday 29 November 2001 12:42 pm, A. Rivera rambled: > print "Press Return to continue or Control-C to stop."; > $input = ; This does work, I use it myself, but be aware that it generates an error message when the script is run with the -w switch, does anyone know away around this? > Is t

Globals in Subroutines

2001-11-29 Thread Matthew Walkup
my (@inputs, @last, $output); sub prepareandread_inputs { my $temporary; push(@inputs, $temporary) while ($temporary = shift); foreach my $input (@inputs) { if ($input->{gzip}) { $input->{handler} = gzopen($input->{full_path}, 'r') o

RE: Globals in Subroutines (OOPS)

2001-11-29 Thread Matthew Walkup
Some old code that i was testing with was accidently left in, the subroutine is: sub prepareandread_inputs { foreach my $input (@inputs) { if ($input->{gzip}) { $input->{handler} = gzopen($input->{full_path}, 'r') or die 'io;'.$input->{full_path} un

RE: Globals in Subroutines (OOPS)

2001-11-29 Thread Matthew Walkup
Apologies: I figured it out, some bad code outside the subroutine, Thanks, Matt -Original Message- From: Matthew Walkup [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 29, 2001 10:44 AM To: [EMAIL PROTECTED] Subject: RE: Globals in Subroutines (OOPS) Some old code that i was test

Re: Getting rid of hash values I don't want..

2001-11-29 Thread Scott R. Godin
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Daniel Falkenberg) wrote: > Hey all, > > Currently I am working on the Linux /etc/passwd file. Now I want to be > able to split the /etc/passwd file for example... > > tunnel:x:503:503::/home/tunnel:/bin/bash > test:x:504:50:Test Account:/hom

print chomp

2001-11-29 Thread Sukhpreet Singh
Why can't I do this? print chomp reverse(@lines = ); or print chomp(reverse(@lines = )); I get Can't modify reverse in chomp at ex3-1.pl line 3, near "))" Execution of ex3-1.pl aborted due to compilation errors. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Re: press return to continue

2001-11-29 Thread Brett W. McCoy
On Thu, 29 Nov 2001, Michael D. Risser wrote: > On Thursday 29 November 2001 12:42 pm, A. Rivera rambled: > > print "Press Return to continue or Control-C to stop."; > > $input = ; > > This does work, I use it myself, but be aware that it generates an error > message when the script is run with t

Re: print chomp

2001-11-29 Thread Greg Meckes
How about: print reverse(chomp @lines = ); ? Greg --- Sukhpreet Singh <[EMAIL PROTECTED]> wrote: > Why can't I do this? > > print chomp reverse(@lines = ); > > or > > print chomp(reverse(@lines = )); > > I get > > Can't modify reverse in chomp at ex3-1.pl line 3, near "))" > Execution of e

file test

2001-11-29 Thread srogers
How can I do more then one file test for file? I'm trying to test a list of files to see if they're a binary file, that isn't executable. -Stephanie -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Timing Out A Loop

2001-11-29 Thread Ken Hammer
Hi all, I have a script that goes out and "grabs" a specific HTML page. I then search through the page, gathering the info I want. Sometimes, the site I'm hitting is either bogged down or unresponsive. I'd like to include a timing mechanism that basically says after 10 secs, quit trying to get

RE: print chomp

2001-11-29 Thread Sukhpreet Singh
hmmm...interesting. it doesn't give me that error but this one lined perl program ends after the first line of input. doesn't wait for EOF i.e. any thoughts? #/usr/bin/perl print reverse(chomp @lines = ); >>perl ex3-1.pl hello hello >> -Original Message- From: Greg Meckes [mailto:[EM

RE: print chomp

2001-11-29 Thread Jeff 'japhy' Pinyan
On Nov 29, Sukhpreet Singh said: >hmmm...interesting. it doesn't give me that error but this one lined perl >program ends after the first line of input. doesn't wait for EOF i.e. any >thoughts? Due to a bug in Perl, sadly. >print reverse(chomp @lines = ); That gets parsed as: print reverse(

Re: file test

2001-11-29 Thread Carl Rogers
At 08:09 PM 11/29/2001 +, [EMAIL PROTECTED] wrote: >How can I do more then one file test for file? > >I'm trying to test a list of files to see if they're a binary file, that >isn't executable. If I understand correctly, you want to check all files in a certain directory to see if they AREN

Re: file test

2001-11-29 Thread Brett W. McCoy
On Thu, 29 Nov 2001, Carl Rogers wrote: > At 08:09 PM 11/29/2001 +, [EMAIL PROTECTED] wrote: > >How can I do more then one file test for file? > > > >I'm trying to test a list of files to see if they're a binary file, that > >isn't executable. > > If I understand correctly, you want to check

Hotline Module

2001-11-29 Thread Trefois Jean-Claude
Hi, I found a simple perl hotline bot, and when I try to launch it, it says that the system command stty is not found! I know it is a shell util under linux, but what is the equavalant system utility under win2k? Thanks for your answer -- Christophe Tréfois ([EMAIL PROTECTED]) Web-Development

RE: newlines

2001-11-29 Thread Carl Rogers
At 02:34 PM 11/29/2001 +, [EMAIL PROTECTED] wrote: If all you want to do is take lines from one file and put it in another, it may be easier to do the following: while ($_=) { if (length($_) > 2) ## if there is something more than a blank line (assuming you don't have

Re: Elegant way to find/remove line from text file

2001-11-29 Thread John W. Krahn
Jim Witte wrote: > > Hello, > > I'm updating a script that manages the .htpasswd file on *N*X boxes. > The user records are stored on successive lines, in the form > $username:$password. What I want to do is find a particular $username, > then delete the entire line. Perhaps this module has

Re: split and replace

2001-11-29 Thread John W. Krahn
Shaunn Johnson wrote: > > --Howdy: > > --This is what I wound up using: > > [example] > > open (FILE, "+ > while () { > s/(\d+)$/0$1/; > print; > } > close FILE > > [/example] > > --The interesting thing is that if I have a decimal > in there, it puts the zero in front of th

I thought I knew....

2001-11-29 Thread A. Rivera
OK, I have this.. $longdate="Fri November 29, 2001"; And I want just the November 29, 2001 part. I tried.. $longdate=~ s/(.*) (.*)/$2/g; =~ s/(.*) ?(.*)/$2/g; =~ s/(.*) *?(.*)/$2/g; =~ s/(.*)\s*?(.*)/$2/g; I'm stumped. Help. Thanks in advance, Ag

create another object

2001-11-29 Thread Neclos
Section 7.2.4 (Adv Perl Prog) contains two classes: RegularEmployee and HourlyEmployee. I need to create a third class called TempEmplyee with its own promote function also. (Note, I also need to create positions so the object can be promoted to them as necessary.) The Adv Perl Prog code is: p

Re: I thought I knew....

2001-11-29 Thread Carl Rogers
At 03:20 PM 11/29/2001 -0800, A. Rivera wrote: >OK, I have this.. > >$longdate="Fri November 29, 2001"; >And I want just the November 29, 2001 part. How about $longdate =~ /(\w+\s)/; $longdate =~ s/$1//; Not too elegant, but it works for this example, I think -- To unsubscribe, e-mail: [EMAIL

Fwd: Re: I thought I knew....

2001-11-29 Thread Carl Rogers
Sorry for the bother, but a bolt of lightning hit me head and gave me a one liner that would also work: $longdate =~ s/^(\w+\s)//; While not entirely true, my mind thinks that if I can do it in one step, I can fool myself into thinking that I know what the heck I'm doing!! ;) I'm still hoping

Using CGI locally

2001-11-29 Thread Clive Lansink
I know that when I call up a local HTML file from within Internet Explorer it works and renders the HTML correctly. Now is there a way to directly call Perl from within IE to create active HTML which is then rendered by IE or can this only be done with a web server of some sort. There must be

Re: Using CGI locally

2001-11-29 Thread Greg Meckes
Yes, you can download Apache and install it. You then can install Perl (if it's not installed with Apache) and run CGI scripts on your box like any web server. Greg --- Clive Lansink <[EMAIL PROTECTED]> wrote: > I know that when I call up a local HTML file from within Internet Explorer it works

Re: Using CGI locally

2001-11-29 Thread Brett W. McCoy
On Fri, 30 Nov 2001, Clive Lansink wrote: > I know that when I call up a local HTML file from within Internet > Explorer it works and renders the HTML correctly. Now is there a way > to directly call Perl from within IE to create active HTML which is > then rendered by IE or can this only be don

Re: How to know a file is being processed?

2001-11-29 Thread Ahmed Moustafa
If I try to lock a file while it is still being transferred, would that cause an error? If so, then I can I know the file is still being processed. What do you think, please? Thanks, Ahmed Randal L. Schwartz wrote: >>"Ahmed" == Ahmed Moustafa Ibrahim Ahmed <[EMAIL PROTECTED]> writes: >>

Re: I thought I knew....

2001-11-29 Thread John W. Krahn
"A. Rivera" wrote: > > OK, I have this.. > > $longdate="Fri November 29, 2001"; > And I want just the November 29, 2001 part. > > I tried.. > $longdate=~ s/(.*) (.*)/$2/g; > =~ s/(.*) ?(.*)/$2/g; > =~ s/(.*) *?(.*)/$2/g; > =~ s/(.*)\s*?(.*)/$2/g;

Re: PERL instead of crontab

2001-11-29 Thread Karthik Krishnamurthy
This would be the rough pseudocode (a very rudimentary one). $SIG{ALRM} = sub { exec (self) }; alarm (2 mins); do stuff; There is a race between the alarm and do stuff. How it would affect your program, you can judge better /kk On Thu, Nov 29, 2001 at 08:25:58AM -0500, Bob Showalter wrote: >

Re: Timing Out A Loop

2001-11-29 Thread Karthik Krishnamurthy
On Thu, Nov 29, 2001 at 03:16:04PM -0500, Ken Hammer wrote: > Hi all, > > I have a script that goes out and "grabs" > a specific HTML page. I then search through > the page, gathering the info I want. > Sometimes, the site I'm hitting is either > bogged down or unresponsive. I'd like to > inclu

[OT] Apache and images dir

2001-11-29 Thread Daniel Falkenberg
Hey all, Just a quick question that is off topic but in the long run it will help me with a Perl program I am working on. My apologize if this annoys anyone. I want to know if there is a command within apache that allows me to find out what my current image dir is. Ie I don't want to have to e

Re: I thought I knew....

2001-11-29 Thread Leon
- Original Message - From: "A. Rivera" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, November 30, 2001 7:20 AM Subject: I thought I knew > OK, I have this.. > > $longdate="Fri November 29, 2001"; > And I want just the November 29, 2001 part. > > I tried.. > $longdate=~

open FILE, "+ (was :

2001-11-29 Thread Leon
- Original Message - From: "Johnson, Shaunn" <[EMAIL PROTECTED]> > open (FILE, "+http://mail.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Elegant way to find/remove line from text file - REDUX

2001-11-29 Thread Randal L. Schwartz
> "A" == A Rivera <[EMAIL PROTECTED]> writes: A> Wouldn't A> cat filename | grep -v "text to ignore" A> be simplest? I'd consider grep -v "text to ignore" filename simpler, and it avoids the useless use of cat. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 5