RE: How can we read files recursively?

2005-07-18 Thread Thomas Bätzler
Wiggins d'Anconia <[EMAIL PROTECTED]> wrote: > Though it seems a bit odd that you want to recursively read a > filehandle. It certainly would be a cool way to handle include directives when parsing config files, i.e. my $conf = "/etc/apache/httpd.conf" open( my $fh, $conf ) or die "Can't open '

RE: set environment variables

2005-07-18 Thread arjun.mallik
Oops , Mine was a wild guess and I am sorry for that. The below test was successful in setting environment variable ... clip #!/usr/bin/perl use Env; print "Before -->"; print %ENV; print "\n"; $ENV{TEMP}="xxx"; print "After --> \n"; print %ENV; print "\n"; system("ec

Re: How can we read files recursively?

2005-07-18 Thread John W. Krahn
Japerlh wrote: > How can we read files recursively? > > Seems like filehandler is a global variable, no matter where it was defined. > and put a openfile in a recursion function doesn't work. > > Anyone can give me any hints? perldoc -q filehandle John -- To unsubscribe, e-mail: [EMAIL PROTE

Re: set environment variables

2005-07-18 Thread Wiggins d'Anconia
"Because it's up-side down. Why is that? It makes replies harder to read. Why not? Please don't top-post." - Sherm Pendley, Mac OS X list [EMAIL PROTECTED] wrote: > Hi , > Try below. > If you are using csh for executing perl script --> system("setenv > TEMPHOME /tmp "); > If your using bas

RE: set environment variables

2005-07-18 Thread arjun.mallik
Hi , Try below. If you are using csh for executing perl script --> system("setenv TEMPHOME /tmp "); If your using bash for executing perl script -> $TEMPHOME = "/tmp"; system("export $TEMPHOME"); Arjun Deserve before you desire -Original Message- From: Nishi Pra

Re: How can we read files recursively?

2005-07-18 Thread Wiggins d'Anconia
Japerlh wrote: > How can we read files recursively? > > Seems like filehandler is a global variable, no matter where it was defined. > and put a openfile in a recursion function doesn't work. > > Anyone can give me any hints? > Thanks a lot. > > In newer perl's you can store a filehandle direc

How can we read files recursively?

2005-07-18 Thread Japerlh
How can we read files recursively? Seems like filehandler is a global variable, no matter where it was defined. and put a openfile in a recursion function doesn't work. Anyone can give me any hints? Thanks a lot. -- Besh wishes, Japerlh -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additi

Re: escaping @

2005-07-18 Thread Wiggins d'Anconia
Lawrence Statton wrote: >>On Mon, 2005-07-18 at 11:53, Wiggins d'Anconia wrote: >> >>>Charles Farinella wrote: >>> I'm sure this is very simple and I am overlooking something. I want to read a list of bad email addresses from a file and remove them from my database. If I pri

RE: Error on: my $sth->execute;

2005-07-18 Thread Christian, Ed
> -Original Message- > From: Ron Smith [mailto:[EMAIL PROTECTED] > Sent: Monday, July 18, 2005 12:50 PM > To: Perl > Subject: Error on: my $sth->execute; > > > Hi all, > > I'm getting an error when trying to do an INSERT statement to > a MySQL database. There's something I'm not under

Re: Usage of defaultvariable @_ with shift

2005-07-18 Thread John W. Krahn
Mathias Pasquay wrote: > Dear list, Hello, > i'am just wondering about the behaviour of shift and the defaultvariable @_ . > > I use the following code:: > > while () { # each line of RULEFILE is stored in > $_ > chomp;# delete \n from $_ >

set environment variables

2005-07-18 Thread Nishi Prafull
Hi: I need to run a script noted by $cmd1 from within perl but before that i need to set the environment variable. how can i do it? I tried my $TEMPHOME = "/tmp"; system($cmd1); But the script still complains the $TEMPHOME is not set. Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addi

Re: Object persistence

2005-07-18 Thread Scott R. Godin
One other thing that's bugging me about this is how to provide the config data to the scripts at runtime in a web environment. If this were a one-time script it would be simple to hard-code them in, but we expect to be able to re-use the package for multiple client environments. The constrai

Re: set environment variables

2005-07-18 Thread Nishi Prafull
I ttied it inside the perl script, but does not seem to work. I did a echo for $TEMPHOME but it was not set. On 7/18/05, John W. Krahn <[EMAIL PROTECTED]> wrote: > Nishi Prafull wrote: > > Hi: > > Hello, > > > I need to run a script noted by $cmd1 from within perl but before that > > i need to

Re: Error on: my $sth->execute;

2005-07-18 Thread Ron Smith
--- Lawrence Statton <[EMAIL PROTECTED]> wrote: > > --0-551411304-1121705388=:507 > > Content-Type: text/plain; charset=iso-8859-1 > > Content-Transfer-Encoding: 8bit > > > > Hi all, > > > > I'm getting an error when trying to do an INSERT > statement to a MySQL databas > > e. There's something

catching signal for an email notification

2005-07-18 Thread DBSMITH
Perl'ers I my code I wrote a routine that executes return code signals. My point being is if after any particular line of code make a call to check its success or failure. My question is if after any code system call or non system call failure according to $? == -1 ? & 127 or $?

Re: set environment variables

2005-07-18 Thread Scott R. Godin
Nishi Prafull wrote: On 7/18/05, John W. Krahn <[EMAIL PROTECTED]> wrote: Nishi Prafull wrote: Hi: Hello, I need to run a script noted by $cmd1 from within perl but before that i need to set the environment variable. how can i do it? I tried my $TEMPHOME = "/tmp"; system($cmd1); But th

Re: set environment variables

2005-07-18 Thread John W. Krahn
Nishi Prafull wrote: > Hi: Hello, > I need to run a script noted by $cmd1 from within perl but before that > i need to set the environment variable. how can i do it? > I tried > my $TEMPHOME = "/tmp"; > system($cmd1); > > But the script still complains the $TEMPHOME is not set. > Thanks. You pr

Re: Object persistence

2005-07-18 Thread Scott R. Godin
Jeff 'japhy' Pinyan wrote: On Jul 13, Scott R. Godin said: http://www.webdragon.net/miscel/DB.pm I'll check it out. All Subscriber::DB objects would share the DBI object -- there's no need for a billion database handles. ok, so possibly one should do it differently than I have, in my exa

Re: Error on: my $sth->execute;

2005-07-18 Thread Adriano Ferreira
On 7/18/05, Adriano Ferreira <[EMAIL PROTECTED]> wrote: > Beware of the difference of double and single quotes in Perl. Double > quotes interpolate: Oops. That's my mistake. Your single quotes are within double quotes. Let's try again. I would say that something is wrong here: my $sth = $dbh

Re: Error on: my $sth->execute;

2005-07-18 Thread Adriano Ferreira
On 7/18/05, Ron Smith <[EMAIL PROTECTED]> wrote: > my $sql = "INSERT INTO products VALUES ('$sku', '$partNum', '$name', > '$descr', '$stockNum', '$qty', '$img', 'vendNum', '$price')"; Beware of the difference of double and single quotes in Perl. Double quotes interpolate: $a = 3; print "a: $a\n"

Re: Download and post in web page pdf file(s)

2005-07-18 Thread Wiggins d'Anconia
Roberts Mr Richard L wrote: > Hi, > Does anyone know how/where I can resolve scp pdf files (user selected) and > display in a web page? > thanks > -r > I suspect the reason this post hasn't gotten more response is because it is incredibly unclear. What do you mean by "how/where" or "resolve" or "

Error on: my $sth->execute;

2005-07-18 Thread Ron Smith
Hi all, I'm getting an error when trying to do an INSERT statement to a MySQL database. There's something I'm not understanding here. Can anyone point me in the right direction? I also tried a "do" method, but got the same error. I know the "param" function is loading the values from the form,

Re: escaping @

2005-07-18 Thread Wiggins d'Anconia
Charles Farinella wrote: > On Mon, 2005-07-18 at 11:53, Wiggins d'Anconia wrote: > >>Charles Farinella wrote: >> >>>I'm sure this is very simple and I am overlooking something. I want to >>>read a list of bad email addresses from a file and remove them from my >>>database. >>> >>>If I print $_,

Re: escaping @

2005-07-18 Thread Charles Farinella
On Mon, 2005-07-18 at 11:53, Wiggins d'Anconia wrote: > Charles Farinella wrote: > > I'm sure this is very simple and I am overlooking something. I want to > > read a list of bad email addresses from a file and remove them from my > > database. > > > > If I print $_, the email addresses are cor

Re: Techno Boi -- was Re: Regular Expressions : Help in understanding

2005-07-18 Thread dave.w.turner
Oops - mean't to group reply On 7/18/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > H. Maybe techno enough to know how to download stuff his > mummy and daddy wouldn't approve of?? > > On 7/17/05, robert johnson <[EMAIL PROTECTED]> wrote: > > > > so, am i to read his email as "kisses

RE: array

2005-07-18 Thread Larsen, Errin M HMMA/Information Technology Department
[EMAIL PROTECTED] wrote: > By the way, since you mentioned chomp - what is the difference > between chomp and chop? I think they are both for removing some type > of un-needed whitespace - does one do space, and the other newline or > something? > >> also chomp() the $guess variable to remove

Re: escaping @

2005-07-18 Thread Wiggins d'Anconia
Charles Farinella wrote: > I'm sure this is very simple and I am overlooking something. I want to > read a list of bad email addresses from a file and remove them from my > database. > > If I print $_, the email addresses are correct, if I try to remove them > from the db I get errors on just t

Re: array

2005-07-18 Thread Wiggins d'Anconia
[EMAIL PROTECTED] wrote: > By the way, since you mentioned chomp - what is the difference between > chomp and chop? I think they are both for removing some type of > un-needed whitespace - does one do space, and the other newline or > something? > > >>also chomp() the $guess variable to remove t

Re: array

2005-07-18 Thread dave.w.turner
By the way, since you mentioned chomp - what is the difference between chomp and chop? I think they are both for removing some type of un-needed whitespace - does one do space, and the other newline or something? > also chomp() the $guess variable to remove the unneeded newline. -- Dave All u

RE: escaping @

2005-07-18 Thread Moon, John
Subject: escaping @ I'm sure this is very simple and I am overlooking something. I want to read a list of bad email addresses from a file and remove them from my database. If I print $_, the email addresses are correct, if I try to remove them from the db I get errors on just the characters be

Re: Limit memory used by perl

2005-07-18 Thread Jay Savage
On 7/16/05, Chris Devers <[EMAIL PROTECTED]> wrote: > On Thu, 14 Jul 2005, Beast wrote: > > > I have prototype that should parse big log files (680MB) converted > > into nice GUI apps. It's not nice if the machine totaly freeze during > > testing. (linux 512MB/2GB swap). > > Are you trying to rea

escaping @

2005-07-18 Thread Charles Farinella
I'm sure this is very simple and I am overlooking something. I want to read a list of bad email addresses from a file and remove them from my database. If I print $_, the email addresses are correct, if I try to remove them from the db I get errors on just the characters before the @. Here is

Re: Usage of defaultvariable @_ with shift

2005-07-18 Thread Xavier Noria
On Jul 18, 2005, at 10:57, Mathias Pasquay wrote: Now i change the line "my $test = shift @_" into "my $test = shift". This should work because shift should use @_ by default. But in this case $test is empty an the second print command prints still the whole @_. Have a look at perldoc -f sh

Usage of defaultvariable @_ with shift

2005-07-18 Thread Mathias Pasquay
Dear list, i'am just wondering about the behaviour of shift and the defaultvariable @_ . I use the following code:: while () { # each line of RULEFILE is stored in $_ chomp;# delete \n from $_ split /;/; #