FTP Question

2001-07-12 Thread Shane Laffin
List, This is a question from a newcommer to perl, so bare with me...!! I want to write some FTP perl scripts... So I downloaded the Net-FTP-Common module from CPAN ( www.cpan.org/ ) I did: perl Make make make test at this point ( make test ), it complained about blib/lib/Net/FTP/Common.pm l

Re: Is my script too big?

2001-07-12 Thread skazat
heh, I think 50k is fine. I've been developing a cgi script that has balooned to 209k... Excluding all the modules it uses.. so we'll say... 300 - 500k are loaded before it gets executed (depends on what it's doing) it's plenty snappy, i think it more depends on what your script does, somet

Re: a problem with Image::Size

2001-07-12 Thread Mel Matsuoka
At 10:47 PM 07/12/2001 -0500, Teresa Raymond wrote: >use Image::Size; > > (in between code snipped) > >use Image::Size qw{ imgsize }; Why are you use-ing Image::Size twice? The first declaration is enough. This code seems to work just fine when I run it from my commandline (both on Win2k and Li

Is my script too big?

2001-07-12 Thread Daniel Falkenberg
List, This may sound like a weird question but I am working on a support database using of coarse CGI and perl. The problem is that the script script.cgi is almost 50K big/small? It contains almost 1000 lines of code. I suppso half of the script is HTML, but the script still seems to work fin

a problem with Image::Size

2001-07-12 Thread Teresa Raymond
Dear fliptop or others: I finally had a chance to try out some of the email attachment code and right know I'm testing the script and receive an error using the Image::Size module at the line: my ($x, $y, $id) = imgsize($file); Any help would be appreciated. #!/usr/local/bin/perl -w use CGI

Re: breakable loop???

2001-07-12 Thread Thomas Jakub
Cool! I'll play around with this tommorrow when I'm less sleepy... --- David Labatte <[EMAIL PROTECTED]> wrote: > I did a quick search of CPAN and found that > Term::ReadKey should > be able to do exactly what you ask. I'm not sure > how platform > dependent it is, but I do remember using it on

Re: breakable loop???

2001-07-12 Thread Thomas Jakub
signal handling sounds interesting! I'll have to play around with that tommorow, along with Readkey! For signal handling, will it only go to the report_stats function if you kill it in some fashion, or will it go there when the program automatically ends? If it doesn't, I can just make the end

Re: [casey@geeknest.com: Re: applause for Casey!!!!! APPLAUSE DUDE! ('Turning the tide...' and a911 plea for help)]

2001-07-12 Thread Ginntonnik
Ahhh, Please excuse me...No Offence the the Shiela's Very ungentleman of me. - Original Message - From: "Bkwyrm" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July 12, 2001 1:30 PM Subject: [[EMAIL PROTECTED]: Re: applause for Casey! APPLAUSE DUDE! ('Turning the tide...'

RE: Very simple text problem

2001-07-12 Thread Dianne Van Dulken
It was pointed out to me that I really should have posted the solution. I thought about it, but it was so simple, I felt a bit embarrassed Instead of just calling the text file, I need to call it within another perl program. Within this, the Content-type needs to be set as application/octet-s

need system () command understanding

2001-07-12 Thread Dave C. Brewington
I am using a script to parse through info sent in from a web form. The information is parsed and creates two text files. One is used for a flat text history file and the other flat text file is used to import into our archaic email system cc:Mail...yuck!!. Everything works! The only problem I

[casey@geeknest.com: Re: applause for Casey!!!!! APPLAUSE DUDE! ('Turning the tide...' and a911 plea for help)]

2001-07-12 Thread Bkwyrm
Especially to those of us who - yes, we do exist in the tech arena - are equipped with that second "X". Thank you Casey. - Forwarded message from Casey West <[EMAIL PROTECTED]> - On Thu, Jul 12, 2001 at 08:07:18AM -0700, Ginntonnik wrote: : Damn, like a bunch of damn women, Fighting a

Re: telling time in perl

2001-07-12 Thread Bernhard Schmalhofer
Dave Arnold wrote: > > Thomas Jakub wrote in message > <[EMAIL PROTECTED]>... > >How can I tell how much time a program has been > >running for in a perl script? I tried to do $time01 = > >localtime() and $time02 = localtime() and then > >subtract $time01 from $time02, but I always get zero, > >

Re: breakable loop???

2001-07-12 Thread David Labatte
I did a quick search of CPAN and found that Term::ReadKey should be able to do exactly what you ask. I'm not sure how platform dependent it is, but I do remember using it once and having some problems with it under dos (but that was eon's ago and I can't remember exactly what I was trying to do [

Re: breakable loop???

2001-07-12 Thread Will Cottay
You might want to look at the CPAN module Term::ReadKey. It provides for non-blocking reads. Or, you could install a signal handler ie: $SIG{INT} = \&report_stats; while (1) { ... your website checking code here ... } sub report_stats { $SIG{QUIT} = \&report_stats; ...Your stat repor

Re: breakable loop???

2001-07-12 Thread Thomas Jakub
--- Adam Carson <[EMAIL PROTECTED]> wrote: > Since you said that you are trying to hit a > webserver until you tell it to stop, you might want > it to check for a different condition, such as a > certain number of hits or a timeout, etc. In Pascal > there is a getkey function, I don't think Perl

Re: applause for Casey!!!!! APPLAUSE DUDE! ('Turning the tide...' and a911 plea for help)

2001-07-12 Thread Casey West
On Thu, Jul 12, 2001 at 08:07:18AM -0700, Ginntonnik wrote: : Damn, like a bunch of damn women, Fighting at the Hair salon. My bikini cut : is closer than yours! Nah! nah! nah! Your comments are as unwelcome as his in their tone and general content. He has apologized and is moving on, I suggest

Re: applause for Casey!!!!! APPLAUSE DUDE! ('Turning the tide...' and a911 plea for help)

2001-07-12 Thread Ginntonnik
Damn, like a bunch of damn women, Fighting at the Hair salon. My bikini cut is closer than yours! Nah! nah! nah! Well to comment on the guys actions, This isn't pro-Perl, Super-Perl, Kick-ass-perl. This Is beginners Perl. The dude never said he taught Perl, Never said he was a Super Perl Programm

Re: breakable loop???

2001-07-12 Thread Adam Carson
Since you said that you are trying to hit a webserver until you tell it to stop, you might want it to check for a different condition, such as a certain number of hits or a timeout, etc. In Pascal there is a getkey function, I don't think Perl has an equivalent though.

Re: breakable loop???

2001-07-12 Thread Thomas Jakub
so... is their a function that won't wait for me to hit enter, and can still get the keys? Or rather, one that will read only once every time it goes through the while loop? --- Adam Carson <[EMAIL PROTECTED]> wrote: > Aaron, > If you read the rest of my post, I mention that > there is still

Re: breakable loop???

2001-07-12 Thread Thomas Jakub
--- Brett Davis <[EMAIL PROTECTED]> wrote: > This might be overkill - but you might try to use a > seperate thread and a > semaphore. Try looking at CPAN for the > documentation to the thread module. > > Brett I found the documentation okay, at http://theoryx5.uwinnipeg.ca/CPAN/data/perl/ext/

Weekly list FAQ posting

2001-07-12 Thread casey
NAME beginners-faq - FAQ for the beginners-cgi 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 addr

RE: Regrex substitution!!!

2001-07-12 Thread Bradley M. Handy
You still could use s///. You just need to take out the '+' sign like so: $number =~ s/\d/x/g; If you use the regexp above for the following example here is what you get: $number = '1 1';# before regexp $number =~ s/\d/x/g;# perform regexp

Re: Regrex substitution!!!

2001-07-12 Thread darren chamberlain
Fernando <[EMAIL PROTECTED]> said something to this effect on 07/11/2001: > I have a credit card number that I want to change to email a > reciept to the customer. This is that I want: > > I have this number: e.j. 8578 596 8552 > I want to convert all the number to "x" like that xxx xxx

Re: applause for Casey!!!!! APPLAUSE DUDE! ('Turning the tide...' and a 911 plea for help)

2001-07-12 Thread Will Cottay
Please accept my apology for my rudeness. You and all the others are correct. If I objected to the author's attitude, I should have either contacted him personally or kept my mouth shut. Don't know why I spoke so viciously; I thought I was in a good mood. You're right Curtis, the code was jus

Re: applause for Casey!!!!! APPLAUSE DUDE! ('Turning the tide...' and a 911 plea for help)

2001-07-12 Thread Curtis Poe
--- Will Cottay <[EMAIL PROTECTED]> wrote: > The only reason I'm posting an example of how to do this is so > that I can feel better about commenting on just how excruciatingly > bad your code is. Well, since you apparently feel that poor code is such an abomination, I don't suppose you'll mind

Re: applause for Casey!!!!! APPLAUSE DUDE! ('Turning the tide...' and a 911 plea for help)

2001-07-12 Thread Jean-Marc Y. Imbert
Bonjour, My personal view of this kind of dialog (I'm myself quite new to perl and cgiand still breaking my teeth on some thick O'reilly books) is the same. The Unix world has a great sense of humor, much sympathy and many *very* helpful people. And this list here, even if don't need it very

Re: breakable loop???

2001-07-12 Thread Aaron Craig
At 11:00 12.07.2001 -0400, Adam Carson wrote: >Aaron, > If you read the rest of my post, I mention that there is still a > problem with the code, ie the waiting for STDIN. I was just pointing out > one flaw in the streamlined version, as it seemed to be the better way to > go for that partic

Re: A litle traking problem

2001-07-12 Thread Aaron Craig
At 11:01 12.07.2001 -0700, Fernando wrote: >I want to keep track of the member of some area of my site since the day >they sign up. I want to count 31 days since the day The sign and pay for >the service by credit card. The think that i don't know is how to make the >day of sign a integer like

RE: applause for Casey!!!!! APPLAUSE DUDE! ('Turning the tide...' and a 911 plea for help)

2001-07-12 Thread Sally
I have to say I agree entirely with Casey -Original Message- From: Casey West [mailto:[EMAIL PROTECTED]] Sent: 12 July 2001 14:54 To: Will Cottay Cc: [EMAIL PROTECTED] Subject: Re: applause for Casey! APPLAUSE DUDE! ('Turning the tide...' and a 911 plea for help) On Thu, Jul 12, 200

Re: breakable loop???

2001-07-12 Thread Adam Carson
Aaron, If you read the rest of my post, I mention that there is still a problem with the code, ie the waiting for STDIN. I was just pointing out one flaw in the streamlined version, as it seemed to be the better way to go for that particular task. I too read the perldocs and saw the same th

Re: applause for Casey!!!!! APPLAUSE DUDE! ('Turning the tide...' and a 911 plea for help)

2001-07-12 Thread Douglas Sparling
--- CM <[EMAIL PROTECTED]> wrote: > As for Mr. Christensen, at your next Perl symposium, > remind him > that when APPENDING to a DOS file that has a chr > (26) (EOF) > mark in it, Perl can't do it... ha ha... Now, if I > wrote the > C program that handled that aspect, I'd CHECK for a > 26 in th

Re: applause for Casey!!!!! APPLAUSE DUDE! ('Turning the tide...' and a 911 plea for help)

2001-07-12 Thread Casey West
On Thu, Jul 12, 2001 at 10:41:32AM -0400, Will Cottay wrote: : The only reason I'm posting an example of how to do this is so : that I can feel better about commenting on just how excruciatingly : bad your code is. Bad tone for this list... : I shudder to think that you are teaching software tec

A litle traking problem

2001-07-12 Thread Fernando
I want to keep track of the member of some area of my site since the day they sign up. I want to count 31 days since the day The sign and pay for the service by credit card. The think that i don't know is how to make the day of sign a integer like 952582121 and then substract day by day once it

Re: applause for Casey!!!!! APPLAUSE DUDE! ('Turning the tide...' and a 911 plea for help)

2001-07-12 Thread Will Cottay
The only reason I'm posting an example of how to do this is so that I can feel better about commenting on just how excruciatingly bad your code is. I shudder to think that you are teaching software techniques to anyone. If you provided an example like that to Tom Christiansen, I'm not surprised

Re: dropping off a few decimal points

2001-07-12 Thread Will Cottay
I hate to say it as the regex way is kinda cool, but $y = int($x * 100)/100; is much faster, at least on my machine. even $x = sprintf("%.2f", int($y * 100)/100); is marginally faster and pads the output to two decimal points.. John Moon wrote: > One way to do it ... > > perl -e '$x=1234

Re: breakable loop???

2001-07-12 Thread Aaron Craig
At 13:36 11.07.2001 -0400, Adam Carson wrote: >--- Adam Carson <[EMAIL PROTECTED]> wrote: > > Gary, you forgot to make it: > > > > while (1) { # infinite loop > > my $c=getc; > > last if ord($c) == 10; # last itteration if $c > > numerically same as 10 > > print "blah\n"; > > } doesn't $c=g

Re: applause for Casey!!!!! APPLAUSE DUDE! ('Turning the tide...' and a 911 plea for help)

2001-07-12 Thread Aaron Craig
At 20:54 11.07.2001 -0700, CM wrote: >that someone has to allow a client to upload a picture to >my server. It took me 6 months to figure out how to >sendmail, a year to figure out how to pop mail, and now, the >last of the building blocks still eludes me... how to get >a sweet smiling JPG pictur