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 = ; > 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 th

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 = ; > > close FILE; > > > > Remember, is something you can iterate over. In scalar > > context it returns just one line (for all intents and purposes) at a > > time. > > Am I righ

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 file"that reads: > > > day > > > weeks > > > months > > > quarter > > >

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

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 swit

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 y

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) =

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 addit

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 t

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

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, $_; $_=~ s

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 () { chop; ($user_name, $file_name, $modified_by, $last_mo

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 li

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 = ; > > close FILE; > > > > Remember, 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 $li

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 fin

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 u

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 () { > chop; >

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] Su

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 >

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 = would read the last lin

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. > ..

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=$_; > > pu

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 sc

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 easie

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] Sub

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 nee

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.

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 Showalt

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 D

reading from directories => no values

2002-01-09 Thread Karsten Borgwaldt
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 not "." or ".." and that end ".foo"!

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 th

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 f

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 fail

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 execu

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 f

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 b

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

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 extr

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 inst

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 =$q->pa

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 Su

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 strin

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

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 filen

Re: array of filenames to open

2002-01-09 Thread Jeff 'japhy' Pinyan
On Jan 9, Yacketta, Ronald said: >looking for a simple example of putting a set of filenames into an array >and then opening each of them for parsing. > >@files = ( "file1", "file2", "file3" ); > >foreach $file (@files) { > open FN, "< $file"; > do something here > close >} Thi

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: P

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 = ;

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"; >$

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

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 fo

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 PROTEC

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

2002-01-09 Thread Frank
On Wed, Jan 09, 2002 at 05:05:34PM -, Parker, wrote: > 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. > >

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> 3>for (@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 =; # ge

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 backu

Re: rand() function

2002-01-09 Thread Roger C Haslock
A simple test I discovered years ago for pseudo-random number generators was to take successive pairs, and plot them on a graph. Bad generators would show distinct lines after a while. eg for (0..1) { plot rand(), read() } - Roger - - Original Message - From: "Robert Howard" <

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

2002-01-09 Thread Michael Fowler
On Tue, Jan 08, 2002 at 08:06:14PM +0530, Prahlad Vaidyanathan wrote: > > open(FD,'sudo grep -h "Connect time" /var/log/message* | grep -v COMMAND |') or die >$! ; > # Do some stuff ... > while ( ) { > # do more stuff > } > > > 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 Steve Maroney
That is way OT!! On Wed, 9 Jan 2002, Mike Rapuano wrote: > > 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: [EM

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 Sor

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, Januar

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: W

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 o

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 gr

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

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 com

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 > > > > @li

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

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 cont

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 (@li

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 Admini

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 Sub

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]

RE: rand() function

2002-01-09 Thread Gary Hawkins
> to take successive pairs, and plot them on a graph. Bad generators would > show distinct lines after a while. > > eg > > for (0..1) { > plot rand(), read() > } > What would it require to make that do something? >ppm search plot Packages available from http://ppm.ActiveState.com/cgibin/

Re: Postgres

2002-01-09 Thread Curtis Poe
--- Agustin Rivera <[EMAIL PROTECTED]> wrote: > 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 Assuming that you are using DBI, you can either c

dir check (NT4 vs. Win2k)

2002-01-09 Thread HANSON
Hi, I was hoping someone might be able to tell me why a dir check is failing on Win2k and not on NT4... I have the following code: $StartingDir = $ENV{"TMP"}; ( -d $StartingDir ) or die "TMP variable $StartingDir is not actually a valid directory\n" ; $StartingTempDir = $StartingDir . $Sla

RE: Perplexed

2002-01-09 Thread Dean Theophilou
Hello Mr. Roth: Yes, I'm interested. Please let me know what you have in mind. Also, regarding my perplexing problem, I think I may have found out what the real problem is. It seems that when a user logs on, the use of the Runh.exe program adds a couple of seconds to the time it takes

Should I use -e -d or opendir ?

2002-01-09 Thread K.L. Hayes
Hello All, I've found lot's of info on how to check if a file exists but nothing about checking if a directory exists. I've posted the relevant code below along with 3 variations of how I "think" it might work. If somebody could point to the one that is "correct" or knows of a better way I'd appr

Re: Hash of hash of array

2002-01-09 Thread Ahmed Moustafa
Jon,thanks a lot for your help :) Jon Molin wrote: > 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 = ( ); >>

Re: Should I use -e -d or opendir ?

2002-01-09 Thread John W. Krahn
"K.L. Hayes" wrote: > > Hello All, Hello, > I've found lot's of info on how to check if a file exists but nothing > about checking if a directory exists. I've posted the relevant code > below along with 3 variations of how I "think" it might work. If > somebody could point to the one that is "c

Re[2]: Should I use -e -d or opendir ?

2002-01-09 Thread K.L. Hayes
Hello John, Thank you for responding. That's what I like most about this list. Ask a question, you usually end up getting a "buffet of answers" when all you could reasonably hope for was a "light snack". :) I appreciate your time & will keep your response for future reference as well. Hungry fo

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

2002-01-09 Thread Prahlad Vaidyanathan
Hi, On Wed, 09 Jan 2002 Michael Fowler spewed into the ether: [-- snip --] > How did you go about determining this? As far as I know, this is not the I'll explain. This is something I just ran. [ My /var/log/messages is a test file containing 1 line only. ] open(FD,"sudo less /var/log/messa

perl sandbox creation

2002-01-09 Thread garrett esperum
Hello all, Here is my environment: solaris 2.6 perl 5.6.1 Here are descriptions of the files I am working with: 1) a meta-data text file 2) a creation.pl file 3) a CVS repository The meta-data file contains information about multiple CVS repository files. There are hundreds of rows with six co