Re: 2 Q's, Google and Me - can you spell it out?

2002-01-09 Thread Henk van Ess
Sorry, I gave the wrong URL http://www.voelspriet.nl/cgi-bin/spriet.cgi What did I do wrong? Your script works fine on my server. I get a 404 when I try to run your link. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Mail forwarding

2002-01-09 Thread Jenny Yuen
Hello, I don´t know much about Perl and want to know how can I make a program that downloads a file from a server. Where can I find reference about it? Jenny

RE: 2 Q's, Google and Me - can you spell it out?

2002-01-09 Thread Bob Showalter
-Original Message- From: Henk van Ess [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 3:19 AM To: Bob Showalter; [EMAIL PROTECTED] Subject: Re: 2 Q's, Google and Me - can you spell it out? Sorry, I gave the wrong URL http://www.voelspriet.nl/cgi-bin/spriet.cgi

RE: 2 Q's, Google and Me - can you spell it out?

2002-01-09 Thread Camilo Gonzalez
This is a common problem. The heredoc terminator must be on a line all by itself, no spaces, no tabs. Here you have it preceeded by spaces. -Original Message- From: Henk van Ess [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 9:22 AM To: Bob Showalter; [EMAIL PROTECTED]

Re: 2 Q's, Google and Me - can you spell it out?

2002-01-09 Thread Henk van Ess
Ty for your fast answer, but I;m still puzzled. Could you paste the script and add the proper syntax? You really would help me with that Henk van Ess -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: 2 Q's, Google and Me - can you spell it out?

2002-01-09 Thread Camilo Gonzalez
The last part of your script looks like this /form /body /html END_HTML } It should look like this /form /body /html END_HTML } In other words, the END_HTML token needs to be on its own line with a return immediately before and after

Re: 2 Q's, Google and Me - can you spell it out?

2002-01-09 Thread Curtis Poe
--- Henk van Ess [EMAIL PROTECTED] wrote: Dear Bob, dear all, I followed your suggestion and installed Active Perl for a local test. If I run the script below, I get the following error: Too late for -T option at C:\spriet.nl Since you're running IIS, getting the too late for -T option

Re: 2 Q's, Google and Me - can you spell it out?

2002-01-09 Thread Henk van Ess
Dear all, Again, ty so much for your help. I'm learning a lot about Perl now. Finally the script is running! Details do matter, don't they? I have a new problem. Check http://www.voelspriet.nl/cgi-bin/spriet.pl check All in Title en press Submit. Error:

Re: 2 Q's, Google and Me - can you spell it out?

2002-01-09 Thread Curtis Poe
--- Henk van Ess [EMAIL PROTECTED] wrote: http://www.voelspriet.nl/cgi-bin/spriet.pl check All in Title en press Submit. Error: 'd:\www\voelspriet.nl\www\cgi-bin\spriet.pl' script produced no output Henk, Find your error log. Since you appear to be using ISAPI, it's likely named

Re: 2 Q's, Google and Me - can you spell it out?

2002-01-09 Thread Henk van Ess
What an excellent tip.. My ISP doesn't give me acces to the log right away, so the browser-trick helped me out! here's the error: Software error: Can't locate object method appropriate via package regex at d:\www\voelspriet.nl\www\cgi-bin\spriet.pl line 17. -- To unsubscribe, e-mail:

Re: 2 Q's, Google and Me - can you spell it out?

2002-01-09 Thread Curtis Poe
--- Henk van Ess [EMAIL PROTECTED] wrote: What an excellent tip.. My ISP doesn't give me acces to the log right away, so the browser-trick helped me out! here's the error: Software error: Can't locate object method appropriate via package regex at

Re: 2 Q's, Google and Me - can you spell it out?

2002-01-09 Thread Henk van Ess
Dear all, It worked! You should have seen my face when I saw the script working for the first time. My first Perl script, thanks to architect Curtis and with great help of Bob and Camilo! Ty all. I'm looking forward to learn more from you guys. Henk van Ess www.voelspriet.nl -- To

Google-script, enhancements

2002-01-09 Thread Henk van Ess
Dear all, I'm enhancing the Google-script, and would love to get an OUTPUT like this: http://www.google.com/search?q=leukas_qdr=m3 How do I get the FIXED value as_qdr=m3 after the VARIABLE q? I don't need a Prefix now, but a suffix. How do I enter this in Perl? Here's the script so far:

authentication help

2002-01-09 Thread K G Findlay
Hi all, I am trying to implement a members section to my site. I would like to find some advice on how to-do this efficiently. I understand that sessions is probably the way to go but how would these be implemented in perl. My users would be expected to login to the site .. then each

Re: Cookies ...

2002-01-09 Thread Briac Pilpré
Polikarpov Cyrill wrote: I'm working whith perl but I don't know how to work whith cookies. Give me please some tips for this one ... A good start would probably be to read the documentation of HTTP::Cookies perldoc HTTP::Cookies or

Re: Google-script, enhancements

2002-01-09 Thread Briac Pilpré
In article 00c101c1993b$662efc40$b81411d5@pc2002, Henk Van Ess wrote: Dear all, I'm enhancing the Google-script, and would love to get an OUTPUT like this: http://www.google.com/search?q=leukas_qdr=m3 How do I get the FIXED value as_qdr=m3 after the VARIABLE q? I don't need a Prefix

Re: pull line #1 from a file

2002-01-09 Thread John W. Krahn
Gary Hawkins wrote: open FILE, logpass.txt; # first line, testing $line = FILE; close (FILE); chomp($line); $line =~ s/testing/tested/; open FILE, logpass.txt; print FILE $line; # first line is now tested close (FILE); This won't work properly because the line being

Re: pull line #1 from a file

2002-01-09 Thread John W. Krahn
Leon wrote: From: Casey West [EMAIL PROTECTED] open FILE, filename or die $!; my $line = FILE; close FILE; Remember, FILEHANDLE is something you can iterate over. In scalar context it returns just one line (for all intents and purposes) at a time. Am I right to say

Re: add text to a file.....Help

2002-01-09 Thread John W. Krahn
Curtis Poe wrote: --- John W. Krahn [EMAIL PROTECTED] wrote: Peter Lemus wrote: I have a file 1st file) that reads... one two three four five Anotherone 2nd filethat reads: day weeks months quarter year century I need to read the 2nd file

Re: piping versus backticks

2002-01-09 Thread John W. Krahn
Harvey Quamen wrote: Hello all: Hello, I'm working my way through Learning Perl (3rd ed) and got stuck in ch 14 (Process Management, pages 201-202 actually, to be specific) where the date command is is opened through a filehandle with a piped open. Just toying around to see how it

Re: add 3 months

2002-01-09 Thread Andrea Holstein
Mark Frater wrote: I'm missing something.. use Date::Manip; $paidto =Mon May 19 23:00:00 2003 NZST; $newpaid = DateCalc($paidto,+3 month,\$err); print paidto =$paidto\n; print newpaid = $newpaid\n; output paidto =Mon May 19 23:00:00 2003 NZST newpaid = I switched the position of

Re: hiding file data

2002-01-09 Thread Andrea Holstein
Stuart Alexander wrote: Hi All, I have a few perl files that I need to send out to a client. However, we do not want them seeing what are in the files for obvious reason. Is there any way that I can hide the info in the files, or should I creat an executable. If you're afraid that your

Re: file name matching

2002-01-09 Thread Andrea Holstein
Scott wrote: Morning: I need to scan a directory for files, they will be in pairs, a .tag file and a .txt file. I need to first make sure the .tag file(s) is there. If it is I need to check for the same prefix .txt file. Here is what I do to check for the file: ($scantag) = *.tag;

RE: pull line #1 from a file

2002-01-09 Thread Gary Hawkins
If the original line is testing\n, the new line will be tested\n\n. No, If the original line is testing\n, the new line will be tested. If the original line is testing, the new line will be tested. on my machine. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: remove spaces before and after . . . howdoi?

2002-01-09 Thread Andrea Holstein
Booher Timothy B 1stlt Afrl/Mnac wrote: o.k. my program finally works (thanks for the help yesterday) . . . but I am convinced I am doing this the long way . . . I am sure there is a more elegant solution (prob a one-liner). Any thoughts . . . #!/usr/bin/perl -w # This program is just to

Re: pull line #1 from a file

2002-01-09 Thread John W. Krahn
Gary Hawkins wrote: If the original line is testing\n, the new line will be tested\n\n. No, If the original line is testing\n, the new line will be tested. If the original line is testing, the new line will be tested. Yes, you are right, however it only works if the file only has

RE:Parsing and regexp

2002-01-09 Thread Jorge Goncalvez
Hi, I made a parsing of a file which contains : this: Adresse IP. . . . . . . . . : 155.132.48.23 like this to obtain the Ip adress. if ($_ =~/Adresse IP/) { $_ =~ s/.+://; $Subnet=$_; push @IPREAL, $_; $_=~

Hash of hash of array

2002-01-09 Thread Ahmed Moustafa
Hi All, My data structure is a hash of a hash of an array. I build it from an input file by the following code. Could you help me write it back to an output file, please? # Code Begins %data = ( ); open (IN, in.txt) || die; while (IN) { chop; ($user_name, $file_name, $modified_by,

Re: Inline file edit

2002-01-09 Thread Michael R. Wolf
[EMAIL PROTECTED] (Ronald Yacketta) writes: Folks, looking for a clean way to change a value in a file on the fly before it is processed (ran). I have a perl script that kicks off several resource scripts (.scr) that are NOT a valid shell script and can not be ran from the command line

Re: pull line #1 from a file

2002-01-09 Thread Michael R. Wolf
[EMAIL PROTECTED] (Leon) writes: open FILE, filename or die $!; my $line = FILE; close FILE; Remember, FILEHANDLE is something you can iterate over. In scalar context it returns just one line (for all intents and purposes) at a time. Am I right to say that although $line

Re: bash 'trap' equivalent ?

2002-01-09 Thread Michael R. Wolf
[EMAIL PROTECTED] (Prahlad Vaidyanathan) writes: Is there a perl equivalent of the 'trap' command in bash ? The reason I ask is, I create a temporary file at the start of a script, and I want to ensure that that temporary file gets removed in case the user hits C-c before the script

Re: @$

2002-01-09 Thread Michael R. Wolf
[EMAIL PROTECTED] (John Edwards) writes: 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(',',

question about DBD:MySql under Win9x

2002-01-09 Thread eva _242_
Hi all. I would like to know why i cannot install the DBD-MySQL-2.1.0.0.9 on my computer. I use Perl 5 (ActivePerl) and i have already install some modules like DBI1.20 and some others (CSV, etc...) and it's always very easy (using Perl MakeFile.PL - nMake - ) and work perfectly well. I

Re: Hash of hash of array

2002-01-09 Thread Jon Molin
Ahmed Moustafa wrote: Hi All, My data structure is a hash of a hash of an array. I build it from an input file by the following code. Could you help me write it back to an output file, please? # Code Begins %data = ( ); open (IN, in.txt) || die; while (IN) { chop; ($user_name,

RE: Inline file edit

2002-01-09 Thread Yacketta, Ronald
Would I be able to use this inline? That is within a perl script itself? If so, might you provide an example? Regards, Ron -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Michael R. Wolf Sent: Tuesday, January 08, 2002 11:43 PM To: [EMAIL PROTECTED]

Re: Inline file edit

2002-01-09 Thread John W. Krahn
Ronald Yacketta wrote: From: [EMAIL PROTECTED] Look at the -i flag. It takes an optional argument, but it sounds like you don't want to keep a backup so use it without the arg. Think about it carefully. And test **VERY** carefully. If you get your code wrong, you've messed it

RE: pull line #1 from a file

2002-01-09 Thread Bob Showalter
-Original Message- From: Leon [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 3:07 PM To: [EMAIL PROTECTED] Subject: Re: pull line #1 from a file ... If I am sitting for a test, I failed because I would probably think that $line = FILE would read the last line, I

RE: email word attachment from html form input

2002-01-09 Thread Bob Showalter
-Original Message- From: katia goforth [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 12:16 AM To: [EMAIL PROTECTED] Subject: email word attachment from html form input ... Name main::tsr_addy used only once: possible typo at ipjustify.pl line 18. ... here is

Re: Parsing and regexp

2002-01-09 Thread Briac Pilpré
Jorge Goncalvez wrote: Hi, I made a parsing of a file which contains : this: Adresse IP. . . . . . . . . : 155.132.48.23 like this to obtain the Ip adress. if ($_ =~/Adresse IP/) { $_ =~ s/.+://; $Subnet=$_; push @IPREAL,

help with Net::POP3

2002-01-09 Thread Cabezon Aurélien
Hi list, I'm playing around Net::POP3. I wanna make a script that is able to check for pop3 mail and then save them in a MySQL database (not implemented yet, usefull for mailing archiving) I'm at the start of the script but i have a problem. First i check for new mail : OK Then i get mail : OK

Re: help with Net::POP3

2002-01-09 Thread Jon Molin
You need to call $handle-quit (); /Jon Cabezon Aurélien wrote: Hi list, I'm playing around Net::POP3. I wanna make a script that is able to check for pop3 mail and then save them in a MySQL database (not implemented yet, usefull for mailing archiving) I'm at the start of the script

Re: help with Net::POP3

2002-01-09 Thread Cabezon Aurélien
| You need to call $handle-quit (); | | /Jon Great, it works now ! I'm so stupid :p thx a lot. --- Cabezon Aurélien http://www.iSecureLabs.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

^M's in file

2002-01-09 Thread Joyce Harris
I have a html file ftp'd to UNIX from Win. There were no line breaks in it so I could not open it in vi because the line was to long. I opened it in pico which inserted it's own line breaks. Is there a way to put remove the ^M's in the file and insert line breaks there instead? Thanks, Joyce

split, ignoring spaces

2002-01-09 Thread Alex Harris
I'm doing the following to seperate out items: @date = split(/ /,$date); However, I keep ending up with a space in @date[3]. How do I totally eliminate spaces so only words/numbers appear in the array? _ MSN Photos is the

RE: split, ignoring spaces

2002-01-09 Thread Hanson, Robert
It sounds like you might have multiple spaces between some elements. Try this... @date = split(/\s+/,$date); This will split on one or more spaces. Rob -Original Message- From: Alex Harris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 9:51 AM To: [EMAIL PROTECTED]

IMAP via SSL

2002-01-09 Thread Pete Emerson
I'm using Mail::IMAPClient to get at my mailbox: my $imap = Mail::IMAPClient-new(Server='my.mail.server', User='username', Password = 'password'); my $messages=$imap-unseen_count('INBOX'); print $messages\n; Does anybody have tips as to how to get this to work via SSL? I'm guessing I need to

Re: split, ignoring spaces

2002-01-09 Thread Jon Molin
Hanson, Robert wrote: It sounds like you might have multiple spaces between some elements. Try this... @date = split(/\s+/,$date); but it will also split on \n,\t so / +/ would be better if it's just space you wanna split on /jon This will split on one or more spaces. Rob

RE: passing a hash using cgi.pm

2002-01-09 Thread Josiah Altschuler
Ok works great. Thanks for the help. Josiah -Original Message- From: Bob Showalter [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 08, 2002 11:38 AM To: 'Josiah Altschuler'; '[EMAIL PROTECTED]' Subject: RE: passing a hash using cgi.pm -Original Message- From: Bob

Re: split, ignoring spaces

2002-01-09 Thread Frank
On Wed, Jan 09, 2002 at 03:55:38PM +0100, Jon wrote: but it will also split on \n,\t so / +/ would be better if it's just space you wanna split on ---end quoted text--- Check out the default settings for split ;-) ie. use Data::Dumper $_=mary had a littlelamb; @_=split; print

Formatting with printf

2002-01-09 Thread Scott
Hi all. I have a couple of strings that I need to format. One of those fields is a alpha/numeric string. Here is the code: printf NEWQUOTES (%-5s, @fields[14]); When I run the code I get 10 extra spaces before the next field instead of the 5. The value of @fields[14] is: A2103. Is

Re: reading from directories = no values

2002-01-09 Thread Jon Molin
Karsten Borgwaldt wrote: Hi all, can anybody tell me, why I can't push any read values into an array? my code is: .. .. .. opendir(IN, some_path) || die opendir: $!; rewinddir(IN); while (defined($_ = readdir(IN))) {unless (m/^\.{1,2}$/ or not m/'.foo'$/) # all files, that are

Encryption/Decryption problem

2002-01-09 Thread Gary Luther
I have a problem that I am not sure how to approach. Problem: We have a website that will direct users to another site for authentication.. The user is then directed back to oursite and the authenticating site responds to a PASS or FAIL URL depending on whether or not the user passed or

Links to DBM Tutorials?

2002-01-09 Thread Morbus Iff
Does anyone have any good tips or links to DBM tutorials? I'd like to start using DBFile and the like to store a database. From the limited knowledge I know of them, you can only use single level hashes? Ultimately, I'm looking to store something like this: $pictures{001}{name}

Re: hiding file data

2002-01-09 Thread Frank
On Tue, Jan 08, 2002 at 07:26:42PM +, Stuart wrote: Hi All, I have a few perl files that I need to send out to a client. However, we do not want them seeing what are in the files for obvious reason. Is there any way that I can hide the info in the files, or should I creat an

RE: hiding file data

2002-01-09 Thread Jenda Krynicky
Gary Hawkins [EMAIL PROTECTED] wrote: Stuart I have a few perl files that I need to send out to a Stuart client. However, we do not want them seeing what are in the Stuart files for obvious reason. What obvious reason? That would be so the client doesn't walk away from the guys who

Re: ^M's in file

2002-01-09 Thread William.Ampeh
Unix comes with the dos2unix and unix2dos commands (or scripts) that takes care of the ^M problem. If you do not have dos2unix, you could use sed or vi. In sed: sed 's/^M//' {infile} {outfile} where ^M is created by holding down the Ctrl and press the character v key followed by

RE: reading from directories = no values

2002-01-09 Thread Bob Showalter
-Original Message- From: Karsten Borgwaldt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 10:29 AM To: [EMAIL PROTECTED] Subject: reading from directories = no values Hi all, can anybody tell me, why I can't push any read values into an array? my code is: ..

Re: Formatting with printf

2002-01-09 Thread Scott
Cancel the request. The field coming in actually had 10 spaces in it, so I just removed the spaces doing this: $field14 = @fields[14]; $field14 =~ s/ //g; print NEWQUOTES ($field14); On Wed, 9 Jan 2002, Scott wrote: printf NEWQUOTES (%-5s, @fields[14]); When I run the code I get 10 extra

RE: question about DBD:MySql under Win9x

2002-01-09 Thread Hamid Majidy
I had similar symptoms on my Linux machine until I recompiled Perl. -Original Message- From: eva _242_ [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 2:04 AM To: [EMAIL PROTECTED] Subject: question about DBD:MySql under Win9x Hi all. I would like to know why i cannot

Re: ^M's in file

2002-01-09 Thread Frank
cat file | perl -pe 's/\r//' foo should work -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

send data to a file.lib

2002-01-09 Thread anthony
Hi, I would like to know how do we send data from data.cgi to a file.lib and get the data back in data.cgi and print it like I'm just doing a simple addition to understand the process of send and retreiving data. like this #!usr/bin... use CGI; $q= new CGI; require file.lib; $number

Re: ^M's in file

2002-01-09 Thread Tanton Gibbs
This question is asked many times in similar forms...is there a perlfaq for this? If not, we need to look into submitting one. - Original Message - From: [EMAIL PROTECTED] To: Joyce Harris [EMAIL PROTECTED] Cc: Perl [EMAIL PROTECTED] Sent: Wednesday, January 09, 2002 11:18 AM Subject:

RE: Formatting with printf

2002-01-09 Thread Bob Showalter
-Original Message- From: Scott [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 10:29 AM To: [EMAIL PROTECTED] Subject: Formatting with printf Hi all. I have a couple of strings that I need to format. One of those fields is a alpha/numeric string. Here is

array of filenames to open

2002-01-09 Thread Yacketta, Ronald
Folks, looking for a simple example of putting a set of filenames into an array and then opening each of them for parsing. I was think of @files = ( file1, file2, file3 ); foreach $file (@files) { open FN, $file; do something here close } am I correct? or isthere

RE: array of filenames to open

2002-01-09 Thread Yacketta, Ronald
actualy it should be an array of variables that contain filenames @files = ( \$file1, \$file2, $file3 ); is that correct? -Original Message- From: Yacketta, Ronald [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 11:44 To: Beginners (E-mail) Subject: array of filenames

Re: Inline file edit

2002-01-09 Thread Michael R. Wolf
Yacketta, Ronald [EMAIL PROTECTED] writes: Would I be able to use this inline? That is within a perl script itself? If so, might you provide an example? If you wanted to make a stand-alone perl script of it, it would look something like this. #! /usr/bin/perl -w $^I = .bak; while() {

RE: Perplexed

2002-01-09 Thread rothd
Alternatively there are some tricks you can use to minimize and even hide the normal perl.exe console. They require the use of Win32::API. Let me know if you are interested. -Original Message- From: Jenda Krynicky [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 8:10 AM To:

RE: array of filenames to open

2002-01-09 Thread Yacketta, Ronald
so in the previous examples given me I could do as such is their another trick to forgo the 4 lines above the local @ARGV ?? foreach $file (@sleepystart) { open FILE, $file; $line = FILE;

foreach, while and flipping $_ !!!!!

2002-01-09 Thread Parker, Robin
Hi all, I have an array of filenames. I want to read through each of the files. I want to try and match a word at the beginning of the line, if the word is not matched, I want to display an error and stop processing. SO... foreach @array_of_files { unless (-r $_ -w $_) {

RE: array of filenames to open

2002-01-09 Thread Jeff 'japhy' Pinyan
On Jan 9, Yacketta, Ronald said: is their another trick to forgo the 4 lines above the local @ARGV ?? The ARGV trick is meant to AVOID the for loop. foreach $file (@sleepystart) { open FILE, $file; $line =

Re: foreach, while and flipping $_ !!!!!

2002-01-09 Thread Jeff 'japhy' Pinyan
On Jan 9, Parker, Robin said: foreach @array_of_files { unless (-r $_ -w $_) { print***Error : Cannot find file $_\n; } OPEN(FILE, $_) or die etc... This code doesn't work -- if you're going to write code, please make sure you've checked it.

RE: array of filenames to open

2002-01-09 Thread Yacketta, Ronald
I see that :) but not sure how to pull just the first line from the file WITHOUT closing it and skipping to the next... local @ARGV = @sleepystart; while () { $line = $_; # ?? s/\Q$line\E/$db_name/g; print; } -Original Message- From: Jeff 'japhy' Pinyan

RE: array of filenames to open

2002-01-09 Thread Jeff 'japhy' Pinyan
On Jan 9, Yacketta, Ronald said: I see that :) but not sure how to pull just the first line from the file WITHOUT closing it and skipping to the next... Oh. Well, what are you trying to do? Change the first line of a set of files? local @ARGV = @sleepystart; while () { $line = $_; #

Re: help with Net::POP3

2002-01-09 Thread Michael R. Wolf
[EMAIL PROTECTED] (Cabezon aurélien) writes: Here is the code : [...] And here is a piece of the code indented to aid understanding. #work with each mail## foreach $item (keys %$list) { # get mail $message = $handle-get($item); # print mail (waiting for

If statement

2002-01-09 Thread Lance Prais
I want the following statement to do something if either of this conditions exist. or Statement if ((substr($_, 42, 7) eq Running) || (substr($Nextline, 42, 7) eq Running)) It is reading the right substrings but failing. What am I doing wrong? -- To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: foreach, while and flipping $_ !!!!!

2002-01-09 Thread Frank
On Wed, Jan 09, 2002 at 05:26:41PM +, beginners wrote: 1$/=undef; # slurp mode 2 3for (@array_of_files) { 4 5 my @wordfound =(); 6 7 print***Error : Cannot find file $_\n unless -r -w; 8 9 open(FILE, $_) or die $_:$!\n; 10 my $file_contents =FILE; # get all the

RE: Inline file edit

2002-01-09 Thread Yacketta, Ronald
This works great with one exception... the two values in the sed need to be passed into the script... IE: changedbsid.pl OLDSID NEWSID filename(s) could be ran against 1 or more files at a time. I havethis which works like a champ on a SINGLE file #!/usr/bin/perl -w $^I = .bak; if ( @ARGV

Re: Inline file edit

2002-01-09 Thread Michael R. Wolf
[EMAIL PROTECTED] (Michael R. Wolf) writes: Other alternatives include #! /usr/bin/perl -w -i #! /usr/bin/perl -w -i .bak $^I = undef; Oops! May have been misleading. Here's commentary on alternatives. $^I = ''; # in-place, but no backup $^I = '.bak'; # in-place, with backup

Re: why does open()ing happen only at the FD line ?

2002-01-09 Thread Michael Fowler
On Tue, Jan 08, 2002 at 08:06:14PM +0530, Prahlad Vaidyanathan wrote: script open(FD,'sudo grep -h Connect time /var/log/message* | grep -v COMMAND |') or die $! ; # Do some stuff ... while ( FD ) { # do more stuff } /script In the above script (an attempt to check my ppp usage), the

Add remove programs windows ??

2002-01-09 Thread Mike Rapuano
I would like to be able to retrieve the same list that pops up in a window when (on 95 NT4) you click the 'Add Remove/ programs' applet in Control Panel. Anybody got any ideas? Mike -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Add remove programs windows ??

2002-01-09 Thread Jenda Krynicky
Steve Maroney [EMAIL PROTECTED] wrote: That is way OT!! in response to: I would like to be able to retrieve the same list that pops up in a window when (on 95 NT4) you click the 'Add Remove/ programs' applet in Control Panel. Anybody got any ideas? Mike Sorry Steve, but it's

RE: Add remove programs windows ??

2002-01-09 Thread Jason Larson
Jenda is correct - it's not OT, and yes, you will need to filter the subkeys. You want to look for the values of the DisplayName strings. These are the values that show up in Add/Remove Programs. -Original Message- From: Jenda Krynicky [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January

RE: array of filenames to open

2002-01-09 Thread Yacketta, Ronald
would this be correct? I have a feeling no.. $_ = $db_name\n if ($. == 1 $_ !~ /$db_name/); -Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 12:21 To: Yacketta, Ronald Cc: Beginners (E-mail) Subject: RE: array of

RE: Add remove programs windows ??

2002-01-09 Thread Mike Rapuano
Thanks Jenda and Jason; I think you're right!! I was checking on MS's website and here's a URL incase anyone is interested: http://support.microsoft.com/default.aspx?scid=kb;EN-US;q247501 thanks again:-) Mike -Original Message- From: Jenda Krynicky [mailto:[EMAIL PROTECTED]] Sent:

Re: Inline file edit

2002-01-09 Thread Michael R. Wolf
[EMAIL PROTECTED] (Ronald Yacketta) writes: This works great with one exception... the two values in the sed need to be passed into the script... IE: changedbsid.pl OLDSID NEWSID filename(s) could be ran against 1 or more files at a time. I havethis which works like a champ on a

Re: email word attachment from html form input

2002-01-09 Thread Steve Maroney
I used MIME::lite once and had some problems with the variables. I looked at some of my code and tried to remeber what I did wrong. I noticed I do not have the variables qutoed when inputing them to the MIME::;lite module. Try removing your quotes and let me know if that works. Steve On Wed, 9

How to change perl form-processing script for Windows NT server?

2002-01-09 Thread Rohesia Hamilton
Hello, I have recently finished my first perl script, which processes a form, returns an html thank you page to the submitter, sends them a confirmation email, sends the company (whose website the form is for) an email and appends the contents of the form to a text file. I used my UNIX account

formatting is a tool [[was: help with Net::POP3]]

2002-01-09 Thread Michael R. Wolf
[[a private correspondant]] writes: [ references to my suggested code format change elided...] Just want to thank you for saying it. You're welcome. I share what took me years to learn. Have grabbed large scripts out there to maybe use some or all, and sometimes first have to reformat

Getting $1 in regex in grep()

2002-01-09 Thread miette
I'd like to use something like this @lines = grep(/^(.*),?$/, @fulltext); except I want @lines to contain what would be in $1...that is the (.*) part instead of the whole line. I was doing this for (@fulltext) { if (/^(.*),?$/) { push (@lines,$1); } } but it seems like the grep

RE: Inline file edit

2002-01-09 Thread Yacketta, Ronald
I asked this in another thread, no response maybe I can muster up one from this thread ;) I was informed of the following: local ($^I, @ARGV) = (.bak, @sleepystart); while () { $_ = $db_name\n if $. == 1; print; close ARGV if eof; } which will nab line one and

RE: Getting $1 in regex in grep()

2002-01-09 Thread Bob Showalter
-Original Message- From: miette [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 4:53 PM To: [EMAIL PROTECTED] Subject: Getting $1 in regex in grep() I'd like to use something like this @lines = grep(/^(.*),?$/, @fulltext); You're sooo close! Just use map()

Re: ^M's in file

2002-01-09 Thread Elaine -HFB- Ashton
Tanton Gibbs [[EMAIL PROTECTED]] quoth: *This question is asked many times in similar forms...is there a perlfaq for *this? If not, we need to look into submitting one. http://history.perl.org/oneliners/filters/dos2unix.html e. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

RE: Getting $1 in regex in grep()

2002-01-09 Thread miette
--- Bob Showalter [EMAIL PROTECTED] wrote: -Original Message- From: miette [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 4:53 PM To: [EMAIL PROTECTED] Subject: Getting $1 in regex in grep() I'd like to use something like this @lines =

Re: Formatting with printf

2002-01-09 Thread John W. Krahn
Scott wrote: Hi all. Hello, I have a couple of strings that I need to format. One of those fields is a alpha/numeric string. Here is the code: printf NEWQUOTES (%-5s, @fields[14]); When I run the code I get 10 extra spaces before the next field instead of the 5. The value of

Re: How to change perl form-processing script for Windows NT server?

2002-01-09 Thread Christopher Solomon
On Wed, 9 Jan 2002, Rohesia Hamilton wrote: Hello, I have recently finished my first perl script, which processes a form, returns an html thank you page to the submitter, sends them a confirmation email, sends the company (whose website the form is for) an email and appends the contents

Re: Getting $1 in regex in grep()

2002-01-09 Thread John W. Krahn
Miette wrote: I'd like to use something like this @lines = grep(/^(.*),?$/, @fulltext); except I want @lines to contain what would be in $1...that is the (.*) part instead of the whole line. I was doing this for (@fulltext) { if (/^(.*),?$/) { push (@lines,$1); }

Date stuff

2002-01-09 Thread Scott Taylor
Can anyone tell me how I can set a variable to a date, then subtract x number of days from it and output the new date? I can't seem to find it anywhere. IE: my $thedate = 01/09/01; my $newdate = $thedate - (1400 * 7); # (of course this doesn't work) Thanks. -- Scott Taylor Systems

Re: add 3 months

2002-01-09 Thread Mark Frater
Hey thanks Andrea . Mon May 19 23:00:00 2003 NZST is that standard date format spat out by Postgres from my DBI query. Odd that its not supported. mark - Original Message - From: Andrea Holstein [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 09, 2002 11:22 PM Subject:

Re: Date stuff

2002-01-09 Thread Jeff 'japhy' Pinyan
On Jan 9, Scott Taylor said: Can anyone tell me how I can set a variable to a date, then subtract x number of days from it and output the new date? I can't seem to find it anywhere. You should use a date manipulation module, such as Date::Calc or Date::Manip, or the standard Time::Local or

Postgres

2002-01-09 Thread Agustin Rivera
Is there a postgres pg.pm module available for Windows? I can't seem to locate one for anything other than *nixes. Thanks, Agustin Rivera Webmaster, Pollstar.com http://www.pollstar.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

  1   2   >