Re: remove a char

2002-03-29 Thread John W. Krahn
Michael Gargiullo wrote: > > In an array say @randomWord > > The second position could contain one of a thousand words, but the words all > end with a comma. How can I strip that comma? > > I've tried using: > > $_=$randomWord[1]; > /(.*.),/; > $randomWord[1] = $_; > > But this is not workin

Re: remove a char

2002-03-29 Thread Johannes Franken
* Michael Gargiullo <[EMAIL PROTECTED]> [2002-03-29 07:26 +0100]: > the words all end with a comma. How can I strip that comma? chop; -- Johannes Franken Professional unix/network development mailto:[EMAIL PROTECTED] http://www.jfranken.de/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Transfer a file via FTP

2002-03-29 Thread Jenda Krynicky
From: Ahmed Moustafa <[EMAIL PROTECTED]> > When a file is transferred via FTP, when is the EOF character added to > the file (only at the end of transmission or also during the > transferring)? Usualy not at all. If you transfer the file in binary mode NOTHING will be modified i

why can't I write to a file

2002-03-29 Thread richard noel fell
Here is an abridged version of what I am trying to do which is: 1) write to a file in one subroutine 2) write the contents of the original file to another file in a separate subroutine. However, I get the error message: Use of uninitialized value in string at ./scratch2.pl line 24, line 1. Us

Re: why can't I write to a file

2002-03-29 Thread Jenda Krynicky
From: richard noel fell <[EMAIL PROTECTED]> > Here is an abridged version of what I am trying to do which is: > 1) write to a file in one subroutine > 2) write the contents of the original file to another file in a > separate subroutine. > > However, I get the error message: >

Re: why can't I write to a file

2002-03-29 Thread richard noel fell
Jenda - Thank you for you very clear explanation. Dick Fell Jenda Krynicky wrote: > > From: richard noel fell <[EMAIL PROTECTED]> > > > Here is an abridged version of what I am trying to do which is: > > 1) write to a file in one subroutine > > 2) write the contents

re: unallowed chars

2002-03-29 Thread Jenda Krynicky
From: Teresa Raymond <[EMAIL PROTECTED]> > Ok, and where are the recommended characters to disallow? I have > tested and I know which characters are going through but I would like > to make sure I've included most of the recommended list. Oh my God. Did you read what I wrote or just scaned over

Re: Transfer a file via FTP

2002-03-29 Thread Ahmed Moustafa
Jenda Krynicky wrote: > Anyway when reading file you don't need any end of line character, > the system KNOWs how long is the file at the moment and > will return undef if you've read all there is. I didn't get what you meant by " will return undef if you've read all there is"; would you expl

RE: remove a char

2002-03-29 Thread Michael Gargiullo
Thank you!! -Original Message- From: John W. Krahn [mailto:[EMAIL PROTECTED]] Sent: Friday, March 29, 2002 3:34 AM To: [EMAIL PROTECTED] Subject: Re: remove a char Michael Gargiullo wrote: > > In an array say @randomWord > > The second position could contain one of a thousand words, but

RE: html to perl vars

2002-03-29 Thread David Gray
Hi Jerry, > How does one convert html: > > > > to a Perl? > > $value_1 = T1; You're going to want to look into the CGI module. (perldoc cgi) Hope that helps, -dave -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Transfer a file via FTP

2002-03-29 Thread Jenda Krynicky
From: Ahmed Moustafa <[EMAIL PROTECTED]> > Jenda Krynicky wrote: > > Anyway when reading file you don't need any end of line character, > > the system KNOWs how long is the file at the moment and > > will return undef if you've read all there is. > > I didn't get what you meant

RE: unallowed chars

2002-03-29 Thread John
Teresa, You've been very helpful to me in the past, so the least I can do is return the favor. I wrote an e-mail autoresponder for my web site which filters out certain characters. Its seems to have worked well for me, so far. I'll post the relevant code below as an example -- you might find it

If statement

2002-03-29 Thread Ned Cunningham
HI, I am having a very newbie problem. I am reading an Access database with ODBC and have my data read into $Data{STATE} My problem is now I need to match to 16 different states. I have so far If ( $Data{STATE} eq "MA" ) Process data My question is should I use an array to test against an

Substitution: How do I say ...

2002-03-29 Thread KEVIN ZEMBOWER
... replace every \t (tab character) which is NOT immediately proceeded by '454354' with ''? Thanks. I suspect this is any easy one, but I've been staring at it for an hour, and I can't figure it out. Brain not working well today. -Kevin Zembower - E. Kevin Zembower Unix Administrator Johns

Re: code review? bibliographic software script

2002-03-29 Thread ERIC Lawson - x52010
Thanks, useful comments. On Thu, 28 Mar 2002, Peter Scott wrote: [many useful things] -- James Eric Lawson Research Publications Editor National Simulation Resource [EMAIL PROTECTED] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The being without an opinion is so pai

time limit???

2002-03-29 Thread Alberto Santana
Hi guys, Suppose I have a Perl (called from a crontab file) script that will (basically) do something like this: $out=`lynx -dump http://lists.cpan.org/showlist.cgi?name=beginners`; open(OUT,">out"); print OUT $out; close(OUT);

RE: Substitution: How do I say ...

2002-03-29 Thread Daryl J. Hoyt
s/\t454354//g; Daryl J. Hoyt Performance Engineer Geodesic Systems 312-832-2010 -Original Message- From: KEVIN ZEMBOWER [mailto:[EMAIL PROTECTED]] Sent: Friday, March 29, 2002 10:58 AM To: [EMAIL PROTECTED] Subject: Substi

Re: anonymous subroutine problem

2002-03-29 Thread Paul Tremblay
On Wed, Mar 27, 2002 at 09:05:02PM -0800, bob ackerman wrote: > i copied the code as is, and got no error. > are you sure line #29 is where you are calling $_incr_count->()? > are you sure the code you are executing is what you posted? > No apparently this is not the code that gives me the err

RE: Substitution: How do I say ...

2002-03-29 Thread Nikola Janceski
er... s/\t(?!454354)//g; > -Original Message- > From: Daryl J. Hoyt [mailto:[EMAIL PROTECTED]] > Sent: Friday, March 29, 2002 12:33 PM > To: KEVIN ZEMBOWER; [EMAIL PROTECTED] > Subject: RE: Substitution: How do I say ... > > > s/\t454354//g; > > > Daryl J. Hoyt > Performance En

RE: Substitution: How do I say ...

2002-03-29 Thread KEVIN ZEMBOWER
Hi, Daryl, thanks for writing. Wouldn't this substitute for tabs which DO have a 454354 after them? I was asking how to sub for tabs which do NOT. -Kevin >>> "Daryl J. Hoyt" <[EMAIL PROTECTED]> 03/29/02 12:32PM >>> s/\t454354//g; Daryl J. Hoyt Performance Engineer Geodesic Systems 31

RE: Substitution: How do I say ...

2002-03-29 Thread David Gray
> er... > s/\t(?!454354)//g; > > > > s/\t454354//g; > > > > replace every \t (tab character) which is NOT > > immediately proceeded > > by '454354' with ''? > > > > Thanks. I suspect this is any easy one, but I've been staring > > at it for > > an hour, and I can't figure it out. Brain

Re: If statement

2002-03-29 Thread Chas Owens
On Fri, 2002-03-29 at 11:46, Ned Cunningham wrote: > HI, > I am having a very newbie problem. > I am reading an Access database with ODBC and have my data read into > > $Data{STATE} > > My problem is now I need to match to 16 different states. > > > > I have so far > > If ( $Data{STATE} eq "

time limit???

2002-03-29 Thread Alberto Santana
Hi guys, Suppose I have a Perl script (called from a crontab file) that will, basically, do something like this: $out=`lynx -dump http://lists.cpan.org/showlist.cgi?name=beginners`; open(OUT,">out"); print OUT $out; close(OUT); $send_it=`mail me\@here.comhttp://www.qtp.ufl.edu/~santana | +

RE: Substitution: How do I say ...

2002-03-29 Thread Daryl J. Hoyt
That's what I get for not reading to carefully ;-). The proper command is "s/\t(?!454354)//g;". Sorry about that. -Original Message- From: KEVIN ZEMBOWER [mailto:[EMAIL PROTECTED]] Sent: Friday, March 29, 2002 11:38 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Substitution:

RE: time limit???

2002-03-29 Thread Nikola Janceski
You might want to see the options for lynx. I am sure you can set the timeout and retry times in some command line option. (Sorry can't tell you the option, don't have lynx, very closed down system). > -Original Message- > From: Alberto Santana [mailto:[EMAIL PROTECTED]] > Sent: Friday, M

RE: unallowed chars

2002-03-29 Thread Teresa Raymond
Thank you John. Jenna I know what you were trying to say but there is a list somewhere of characters that for security reasons oughtn't be allowed. I'm sorry if it seemed like I didn't read your message, I did but I remember about six months ago someone posted this list I'm talking about. I

Re: anonymous subroutine problem

2002-03-29 Thread bob ackerman
looks like you are accessing your array (argument to new()) at the second element ($_[1]) instead of first ($_[0]). On Friday, March 29, 2002, at 07:33 AM, Paul Tremblay wrote: > On Wed, Mar 27, 2002 at 09:05:02PM -0800, bob ackerman wrote: > >> i copied the code as is, and got no error. >> ar

Re: anonymous subroutine problem

2002-03-29 Thread bob ackerman
oops. you are correct. 2nd element is what you want. first is the class. so, i copied your call to new and got no error and was able to access the elements. On Friday, March 29, 2002, at 07:33 AM, Paul Tremblay wrote: > On Wed, Mar 27, 2002 at 09:05:02PM -0800, bob ackerman wrote: > >> i copie

Test using perl 5.8.0

2002-03-29 Thread Jerry McConnell
Where/How can one get a copy of the perl 5.8 development version? I have the 5.7.3 development version and have been testing with perlio/sfio, Solaris 2.8, >256 files open with >2gb files. I'm hoping that this specific set of requirements works better under 5.8, but I'd like to try it asap.

Re: time limit???

2002-03-29 Thread Jenda Krynicky
From: Alberto Santana <[EMAIL PROTECTED]> > Suppose I have a Perl script (called from a crontab file) that will, > basically, do something like this: > > $out=`lynx -dump http://lists.cpan.org/showlist.cgi?name=beginners`; > open(OUT,">out"); print OUT $out; close(OUT); $send_it=`mail > me\@here

Trouble with HTML::Parser

2002-03-29 Thread Ron Goral
Would someone be kind enough to tell me why the code below does not work? It is a library of sorts and resides in a file separate from the main cgi (hence the "1;" at the end). It is activated with the call &MapFormData($fileName). The print statements in MapFormData print to the screen as I wan

RE: code review? bibliographic software script

2002-03-29 Thread murphy, daniel (BMC Eng)
Thank you, too, guys. I learned a lot from those comments. Dan Murphy [EMAIL PROTECTED] EMC Corp.508-249-3322 Hopkinton, MA 01748 EMC² where information lives -Original Message- From: ERIC Lawson - x52010 [m

Re: time limit???

2002-03-29 Thread Peter Scott
At 12:50 PM 3/29/02 -0500, Alberto Santana wrote: >Hi guys, > >Suppose I have a Perl script (called from a crontab file) that will, >basically, do something like this: > >$out=`lynx -dump http://lists.cpan.org/showlist.cgi?name=beginners`; >open(OUT,">out"); >print OUT $out; >close(OUT); >$send_it

Writing Dir Names into a File

2002-03-29 Thread garrett esperum
Hello all, I want to read all of the directory names after $mydir, and then print those names into a file. How do I do this? Thanks!! -garrett _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com

Writing Dir Names into a File

2002-03-29 Thread garrett esperum
Hello all, Sorry about my previous message, I left alot of key info out. I am using Solaris 2.6. I want to read all of the directory names after $mydir, and then print those names into a file. How do I do this? Currently I have this as my script: #!/path/to/perl -w use strict; my $dir = '/

Re: unallowed chars

2002-03-29 Thread John W. Krahn
John wrote: > > The incoming e-mail form variables from my web page are vetted through > various tests before they're processed. The first thing I do is to translate > all "<, >, {, }, [, ]" characters to either "(" or ")", as appropriate. My > theory is that I don't want any HTML tags being take

Understanding untaint

2002-03-29 Thread Tom Ransom
I need help debugging/understanding how this piece of code is working. I have checked values going into and within "cl" and it operates as expected. Where does the "%+" come from? === $DataDir="/www/htdocs/"; $template_directory="templates/"; $tem

RE: unallowed chars

2002-03-29 Thread John
John, You raise a good point. I wondered about that at the time I wrote the program and ran experiments to see if I was getting what I thought I wanted. I don't think my experiments were as thorough as they should have been. I'd thought the classes I set up, "<->", "{-}", and "[-]", only contai

RE: remove me from your list

2002-03-29 Thread june
June in Kansas -Original Message- From: Mariusz [mailto:[EMAIL PROTECTED]] Sent: Monday, March 11, 2002 12:37 AM To: [EMAIL PROTECTED] Subject: uploading files Hi, I wrote this simple script to upload files, but when I substitute param('uploadfile') with the actual path in double quot

searching an array

2002-03-29 Thread Mahendra Thacker
Hi, A question from a relative newbie. How does one search an array of numbers for a number? (without using foreach; is there any function?) Say, I want to do something like this: == $a = 5; @arr = ( 7 9 3 6 ); if ( seach( $a, @arr ) ) { print "Found $a in the list \n"; } else { print

Re: Understanding untaint

2002-03-29 Thread Randal L. Schwartz
> "Tom" == Tom Ransom <[EMAIL PROTECTED]> writes: Tom> &cl("$DataDir$template_directory$template_name") =~ /(.+)/; Tom> my $temp_file = $1; #keeps nasties from manipulating Don't ever use $1 without checking the return value of the match. You might be using the previous $

RE: remove me from your list

2002-03-29 Thread Timothy Johnson
Perhaps you should take this up with Perl.org. See the bottom of the email you sent out and responded to for instructions. -Original Message- From: june [mailto:[EMAIL PROTECTED]] Sent: Friday, March 29, 2002 4:04 PM To: [EMAIL PROTECTED] Subject: RE: remove me from your list June i

RE: searching an array

2002-03-29 Thread Wagner-David
Here is one shot: #!perl -w my $a = 5; my @arr = qw( 7 9 3 6 5); my @MyHits = grep(/$a/ , @arr ); if ( @MyHits ) { print "Found $a in the list \n"; } else { print "Did not find $a in the list\n"; } Made minor changes: used warnings, my. Wags ;) -Original Message- From:

Grep (WAS RE: searching an array)

2002-03-29 Thread Timothy Johnson
I've heard that grep is fairly resource-intensive. Is there any truth to the rumors? Is there a time where using grep will be faster than cycling through an array? -Original Message- From: Wagner-David [mailto:[EMAIL PROTECTED]] Sent: Friday, March 29, 2002 4:20 PM To: 'Mahendra Thacke

RE: Grep (WAS RE: searching an array)

2002-03-29 Thread Wagner-David
I was just going by their desire to NOT use foreach. Most of what I do, I am usually reading in the data and doing the search line by line. As to grep being a hog, \rong person to ask. Maybe one of the Perl gurus will answer the group. Sorry. Wags ;) -

Re: Writing Dir Names into a File

2002-03-29 Thread garrett esperum
Hello again, So I have modified my script a bit and it works. However, now I want to not read in the "." and ".." directories. How can I do this?? I am having problems with this part. I think my "while ( my $file = (!/^\.\.?$/,readdir( DIR )) )" part is wrong. Any suggestions?? Below is my n

why does flock give Bad file number?

2002-03-29 Thread Ahmed Moustafa
Why does exclusive flock give Bad file number (Solaris)? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: unallowed chars

2002-03-29 Thread John W. Krahn
John wrote: > > John wrote: > > > > The incoming e-mail form variables from my web page are vetted through > > various tests before they're processed. The first thing I do is to > translate > > all "<, >, {, }, [, ]" characters to either "(" or ")", as appropriate. My > > theory is that I don't w

Re: searching an array

2002-03-29 Thread John W. Krahn
Mahendra Thacker wrote: > > Hi, > > A question from a relative newbie. > > How does one search an array of numbers for a number? > (without using foreach; is there any function?) > > Say, I want to do something like this: > > == > > $a = 5; > @arr = ( 7 9 3 6 ); > > if ( seach( $a, @arr ) )

Re: Writing Dir Names into a File

2002-03-29 Thread John W. Krahn
Garrett Esperum wrote: > > So I have modified my script a bit and it works. However, now I want to not > read in the "." and ".." directories. How can I do this?? I am having > problems with this part. > > I think my "while ( my $file = (!/^\.\.?$/,readdir( DIR )) )" part is wrong. > Any suggest

I have to Randomize my Query output

2002-03-29 Thread FLAHERTY, JIM-CONT
I am lost . I have this quiz program , It prints and grades the quiz . now the managers want to make it put out random tests My Code : $dbh =DBI ->connect($data_source, $username, $password) or die "cant connect to $data_source : my $dbh-> errstr\n"; my $sth1 = $dbh -> prepare("select

Analog Help

2002-03-29 Thread Craig Westerman
My host server has Analog setup to run at midnight each night. There is no cron job that does this. I can't find what makes it run at this time. Tech support is gone for weekend. Can anyone tell me how to find out how runs automatically apart from cron? How to run manually? I've tweaked the conf

Tk::FontDialog

2002-03-29 Thread frank
Hi. I' m trying to use the Tk::FontDialog package. I' ve installed and the only documentation i colud find is this: use Tk::FontDialog; $font = $top->FontDialog->Show; This just doesn' t work. I get this message from perl: wrong # args: should be "font actual font ?-displayof window? ?

Re: I have to Randomize my Query output

2002-03-29 Thread bob ackerman
you aren't showing code that fetches the result of get the random record. are you fetching it? what do you get? any errors? what do you mean 'it does nothing? it looks like you want to requery with select where num = $numbers[$r_num] .. that way you would be using the value from the first query

Perl In Windows

2002-03-29 Thread AndrewMcHorney
I am starting a perl programming class next Tuesday. I know perl runs under unix. I would like to do some of the homework on windows. What do I need to download and install to execute perl programs under windows 98. I am looking for something for free, not a disk hog, easy to install and use.

checking if file exists on remote machine...

2002-03-29 Thread Randy Brown
I'm trying to check if a file exists on a remote machine using perl. I am unable to make this work. Anyone have any suggestions? Thanks! Randy # if source files not there, error $length=@source_file; $counter=0; print "\n\n"; while ($counter < $l