checking updated copy of file on remote ftp

2002-02-08 Thread Student of Perl
hi i want a suggession for my Perl code. i am coding a Perl script that downloads updated copies of files from a ftp site ; For the first time it will download all the files. And for every next execution of this script it will check the local copies of the files with corresponding remote files

Win32::ActAcc : How to print event details into Text file

2002-02-08 Thread Abhra Debroy
Hi All In the below script we can print event details into console window by debug_spin(1). Now how can I print those event details ina text file ? __ use strict; use Win32::OLE; use Win32::ActAcc; sub main { print "\n"."aa

Using Perl for a Wrapper

2002-02-08 Thread jbajin
I was wondering if it would be possible to create a script to act as a wrapper. It would kick off any processes that would be scheduled to start and if they would error that the wrapper would pick it up and report it somewhere else say through email or whatever.. What would it take to create so

Re: Convert to a one liner

2002-02-08 Thread Peter Scott
At 04:12 PM 2/8/02 -0800, Scott Lutz wrote: >This should be a weekly thing : >See who can send in the most useful Perl one liner! Hie thee to the Fun With Perl list (see lists.perl.org). This is not necessarily the stuff of beginners. >So to start it off, I would like some suggestions on some

RE: file question

2002-02-08 Thread Wagner-David
I took the open through the close and ran the script and each time, it added another line to the file. Running AS 5.6.0 Build 623 on w2k. Wags ;) -Original Message- From: Chris Zampese [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 15:05 To: [EMAIL PROTECTED

Form reports

2002-02-08 Thread Naika - EV1
Bare with me but I'm a beginner and new to this list. I need advice on poll results. What should I be researching? I have forms submitting off websites and I can direct them to email the results but how do I write them to a file to be redisplayed on a webpage? Thanks for any help. - Naika ht

Re: sort on anonymous array elements as hash values

2002-02-08 Thread birgit kellner
Many thanks to Michael and the others who responded to this query! Needless to say: problem solved. Thanks again, Birgit Kellner --On Mittwoch, 06. Februar 2002 17:59 + Michael Lamertz <[EMAIL PROTECTED]> wrote: > > H, did I make sense? > > -- > If we fail, we wi

Re: Password Generator

2002-02-08 Thread Jason Purdy
There's a cool web password generator here: http://www.geodsoft.com/cgi-bin/password.pl Which has their software source available, too. Jason - Original Message - From: "Nikola Janceski" <[EMAIL PROTECTED]> To: "'Hanson, Robert'" <[EMAIL PROTECTED]>; "'Mike'" <[EMAIL PROTECTED]>; <[EMAI

file question

2002-02-08 Thread Chris Zampese
Hi everyone, I thought that the folowing code should save the data to the file, and then when it was run again it should save the new data on a newline in the same file. It saved the data once, but it will not repeat the feat. The data comes from a form, and I use it to generate an email

Convert to a one liner

2002-02-08 Thread Scott Lutz
This should be a weekly thing : See who can send in the most useful Perl one liner! So to start it off, I would like some suggestions on some "not so cryptic" one liner methods to do the following : #!/usr/bin/perl -w use strict; opendir(TEMP_DIR, "/home/slutz/temp"); my @items = grep(/

Re: Perl variable - cuts

2002-02-08 Thread John W. Krahn
"John W. Krahn" wrote: > > Chris Hurt wrote: > > > > Hi all; > > Hello, > > > Got a newbie question for you. I have a number of exactly 10 digits > > (2001090701) and I want to be able to read it from a file, cut the first 8 > > digits from the last two digits and put each into a variable (for

Re: Perl variable - cuts

2002-02-08 Thread John W. Krahn
Chris Hurt wrote: > > Hi all; Hello, > Got a newbie question for you. I have a number of exactly 10 digits > (2001090701) and I want to be able to read it from a file, cut the first 8 > digits from the last two digits and put each into a variable (for comparison > and addition). I would do it

Re: Friday afternoon help!

2002-02-08 Thread Jonathan E. Paton
--- Scott Lutz <[EMAIL PROTECTED]> wrote: > > Why is it that you have to "\" out the @ symbol in the > regex below? Because scalars, arrays and suchlike are stuffed into the regex before it is compiled. Rather like a regex version of double quotes (and why quotemeta() exists). Use single quote

Friday afternoon help!

2002-02-08 Thread Scott Lutz
Why is it that you have to "\" out the @ symbol in the regex below? #!/usr/bin/perl -w use strict; opendir(TEMP_DIR, "/home/slutz/temp"); my @items = grep(/\.BAD/,readdir(TEMP_DIR)); closedir(TEMP_DIR); my ($file, $line); foreach $file (@items) { print "Going into file : $file\

Re: Password Generator

2002-02-08 Thread Michael Pratt
Im trying to setup a form that will generate a password and send it to you via email. "Nikola Janceski" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I think he wants to use the crypt() function. > > -Original Message- > From: Hanson, Robert [mailto:

RE: Password Generator

2002-02-08 Thread Nikola Janceski
I think he wants to use the crypt() function. -Original Message- From: Hanson, Robert [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 5:22 PM To: 'Mike'; [EMAIL PROTECTED] Subject: RE: Password Generator To do what? Just generate random passwords? How about this. my @c = (

RE: Password Generator

2002-02-08 Thread Hanson, Robert
To do what? Just generate random passwords? How about this. my @c = (a..z,A..Z,0..9,qw|! @ # $ % ^ & * ( ) [ ]|); for (1..8) { print $c[int(rand(@c) + 1)]; } Rob -Original Message- From: Mike [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 4:47 PM To: [EMAIL PROTECTED] Subj

Re: dbi modules

2002-02-08 Thread Eric Jones
I am using Mysql-3.23.43-1 and I also have Oracle9i (9.0.1) running on this SuSe Linux 7.2 Pro box. So far they haven't interfered with each other. ej Brett W. McCoy wrote: >On Fri, 8 Feb 2002, Eric Jones wrote: > >>Done and so far that works except it won't connect to the DB now through >>sock

Re: dbi modules

2002-02-08 Thread Brett W. McCoy
On Fri, 8 Feb 2002, Eric Jones wrote: > Done and so far that works except it won't connect to the DB now through > socket 111. But at least I know it's no longer perl mods acting up and > I know what to look for and how to fix it next time. > thanks for the advice Out of curiosity, what databas

Re: dbi modules

2002-02-08 Thread Eric Jones
Done and so far that works except it won't connect to the DB now through socket 111. But at least I know it's no longer perl mods acting up and I know what to look for and how to fix it next time. thanks for the advice ej Brett W. McCoy wrote: >On Fri, 8 Feb 2002, Eric Jones wrote: > >>Ok th

Re: dbi modules

2002-02-08 Thread Brett W. McCoy
On Fri, 8 Feb 2002, Eric Jones wrote: > Ok that solved the DBI error but a bunch of others cropped up so I > have some work to do on my perl install. > Running perl -MCPAN -e shell didn't finish everything as I though it > would. Good luck, mate. -- Brett

Re: dbi modules

2002-02-08 Thread Eric Jones
Ok that solved the DBI error but a bunch of others cropped up so I have some work to do on my perl install. Running perl -MCPAN -e shell didn't finish everything as I though it would. ej Brett W. McCoy wrote: >On Fri, 8 Feb 2002, Eric Jones wrote: > >>Yes that is what I am getting. >>IF the

Password Generator

2002-02-08 Thread Mike
IS there a perl password generator out there? Mike -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: dbi modules

2002-02-08 Thread Brett W. McCoy
On Fri, 8 Feb 2002, Eric Jones wrote: > Yes that is what I am getting. > IF the object exists but is unloadable and I have run cpan to load mods > what is the best move? uninstall and install cpan or is this possible? > or just run CPAN again and make changes to the info? I'd try reinstalling fi

Cannot SendMail

2002-02-08 Thread McCollum, Frank
Maybe there is a perl solution to this problem.maybe not. I have a distribution list with several hundred names in it (now these names are in the format "Perl Beginners" not "[EMAIL PROTECTED]" and I cannot figure out how to tell Outlook to give me the fully qualified adresses - That

Re: dbi modules

2002-02-08 Thread Eric Jones
Yes that is what I am getting. IF the object exists but is unloadable and I have run cpan to load mods what is the best move? uninstall and install cpan or is this possible? or just run CPAN again and make changes to the info? ej Brett W. McCoy wrote: >On 8 Feb 2002, Chas Owens wrote: > >>just

RE: dbi modules

2002-02-08 Thread Brett W. McCoy
On 8 Feb 2002, Chas Owens wrote: > just to prove TMTOWTDI: perl -MDBI '' Actually, I believe the OP's error said that it couldn't load the object module, which may mean that he has a broken installation. Since 'use DBI' in his script is failing, perl -MDBI or perl -e 'use DBI' is just going to

RE: dbi modules

2002-02-08 Thread Chas Owens
just to prove TMTOWTDI: perl -MDBI '' On Fri, 2002-02-08 at 15:53, Balint, Jess wrote: > Or if you are one of the unfortunate one of us who doesn't have locate, try > > perl -e 'use DBI;' > > Here is my output on a non-DBI system: > > [jbalint@davinci|rmds02]/qmds/jbalint/20020128% perl -e 'us

RE: dbi modules

2002-02-08 Thread Balint, Jess
Or if you are one of the unfortunate one of us who doesn't have locate, try perl -e 'use DBI;' Here is my output on a non-DBI system: [jbalint@davinci|rmds02]/qmds/jbalint/20020128% perl -e 'use DBI;' Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib/perl5/5.00503/sun4-solaris /usr/loc

Re: Date

2002-02-08 Thread Elaine -HFB- Ashton
Mayank [[EMAIL PROTECTED]] quoth: *>Hi all *> *>Is there a module/or some function to do calculations on date e.g. if *>today is 1st March, and i want the date for previous day (i.e. 28th or *>29th Feb) Date::Calc http://search.cpan.org/search?dist=Date-Calc Date::Manip http://search.cpan.org/sea

RE: How Decompose Hash of Arrays

2002-02-08 Thread Hewlett Pickens
>>what are you doing?!?!? shouldn't it be: >>for my $hewArray (keys %hashStats) >> { >> print "@$hewArray @$hashStats{$hewArray} \n"; >> } I was blindly copying from the book (once get something to work, then go back and tr

Re: snmpwalk with net::snmp

2002-02-08 Thread Elaine -HFB- Ashton
[EMAIL PROTECTED] [[EMAIL PROTECTED]] quoth: *>i've gotten to be somewhat comfortable using net::snmp. at the very least *>i've used its get_request and set_request methods. however an oid used by *>cisco seems to need to be called using 'snmpwalk' rather than a get or set *>request. net::snmp

RE: How Decompose Hash of Arrays

2002-02-08 Thread Nikola Janceski
what are you doing?!?!? shouldn't it be: for my $hewArray (keys %hashStats) { print "@$hewArray @$hashStats{$hewArray} \n"; } -Original Message- From: Hewlett Pic

Re: dbi modules

2002-02-08 Thread Brett W. McCoy
On Fri, 8 Feb 2002, Eric Jones wrote: > Hello, I have perused the archives but can't find an answer to my problem. > I have built a perl program, I use DBI.pm in it. > Upon running the program I get the following return: > > "Can't locate loadable object for module DBI in @INC (@INC contains: > /

RE: How Decompose Hash of Arrays

2002-02-08 Thread Hewlett Pickens
That was one of the tries I'd made but not included in my initial post. - print "HewTrace004 - from 1st for block at top of PP pg 277 \n"; my @hewArray; for $hewArray (keys %hashStats) {

dbi modules

2002-02-08 Thread Eric Jones
Hello, I have perused the archives but can't find an answer to my problem. I have built a perl program, I use DBI.pm in it. Upon running the program I get the following return: "Can't locate loadable object for module DBI in @INC (@INC contains: /usr/lib/perl5/site_perl//5.6.0/i586-linux /usr/l

RE: Wierd Error

2002-02-08 Thread Brett W. McCoy
On Fri, 8 Feb 2002, Balint, Jess wrote: > Only if "" counts as uninitialized. I would mind making "" be zero in that > case. Nope, "" counts as a value, one that returns boolean false, but still a value that will return true if you test for definedness. -- Brett

Perl, Oracle, and XML (or the three blind mice).

2002-02-08 Thread Ryan Guy
I was wondering if someone could point me in the direction of good documentation on how perl ties in with Oracle and XML. I am developing a work order system for my company which will potentially make extensive use of these technologies (and perhaps more where applicable). Any information would

RE: Wierd Error

2002-02-08 Thread Chas Owens
Your version of Perl is to old for the "no warnings" trick. You must use the $^W variable. Use it like this: { #going to do some stuff I know is okay local($^W) = 0; really_dangerous_stuff(); } See perldoc perlvar for more info. On Fri, 2002-02-08 at 13:45, Balint, Jess wrote:

Re: @ARGV and getopts

2002-02-08 Thread Michael Fowler
On Fri, Feb 08, 2002 at 08:13:17AM -0600, Pfeiffer, Richard wrote: > My command line looks similar to this: > command.pl-r"z:\Tech Team" -p"/Tools Team" -f"File Found Today.txt" > -v"RDP 1.2_A" > > What I'm trying to check for is to make sure when people run my script, they > have each op

Re: execute dynamic block of code

2002-02-08 Thread Michael Fowler
On Thu, Feb 07, 2002 at 06:43:20PM -0500, Jeff 'japhy' Pinyan wrote: > ($func, $fname, @args) = ( > "UCM::ucmPiperNewsDB", > \&UCM::ucmPiperNewsDB, > $file, uc("INTERNET_$env"), $script, > ); I'm thinking you meant: ($fname, $func, @args) = ( "UCM::ucmPiperNewsDB",

Re: Wierd Error

2002-02-08 Thread Michael Fowler
On Fri, Feb 08, 2002 at 01:00:13PM -0500, Balint, Jess wrote: > Hello all. I am getting wierd errors on the following piece of code. Why are they weird warnings? They seem normal to me; you're trying to treat "" as a number, which is usually wrong, so Perl is warning you about it. > 95:

Re: How Decompose Hash of Arrays

2002-02-08 Thread Randal L. Schwartz
> "Hewlett" == Hewlett Pickens <[EMAIL PROTECTED]> writes: Hewlett> After creating a "Hash of Arrays", how can I later access the individual Hewlett> elements of the Array values? ... Hewlett> unless (dbmopen %hashStats, $dbStats, 0666) You can't trivially place references into a DBM. Se

RE: Wierd Error

2002-02-08 Thread Balint, Jess
Only if "" counts as uninitialized. I would mind making "" be zero in that case. -Original Message- From: Brett W. McCoy [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 2:09 PM To: Balint, Jess Cc: '[EMAIL PROTECTED]' Subject: RE: Wierd Error On Fri, 8 Feb 2002, Balint, Jess

RE: Wierd Error

2002-02-08 Thread Brett W. McCoy
On Fri, 8 Feb 2002, Balint, Jess wrote: > Nope. Not possible. There are array refs stored in each $freqidx{$_}. It is > spitting out that error messages tons of times. Then what about the array elements in @{$freqidx{$_}} -- could uninitialized values be there? -- Brett

Re: directory tree minus certain directories

2002-02-08 Thread Michael Fowler
On Fri, Feb 08, 2002 at 09:55:58AM -0800, John wrote: > Is this the right/best way to do this? I wanted to use File::Find > but couldn't figure out how to exclude directories. I want to display > a directory tree, but I don't want to display the directories called > WORKAREA, STAGING, EDITION

RE: Wierd Error

2002-02-08 Thread Balint, Jess
Nope. Not possible. There are array refs stored in each $freqidx{$_}. It is spitting out that error messages tons of times. -Original Message- From: Brett W. McCoy [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 2:03 PM To: Balint, Jess Cc: 'Chas Owens'; '[EMAIL PROTECTED]' Sub

RE: Wierd Error

2002-02-08 Thread Balint, Jess
That would have been easy, but now here is what I get: Can't locate warnings.pm in @INC (@INC contains: /usr/local/lib/perl5/5.00503/sun4-solaris /usr/local/lib/perl5/5.00503 /usr/local/lib/perl5/site_perl/5.005/sun4-solaris /usr/local/lib/perl5/site_perl/5.005 .) at ../20020128/pasummary.pl line

RE: Wierd Error

2002-02-08 Thread Brett W. McCoy
On Fri, 8 Feb 2002, Balint, Jess wrote: > That errors seems to be quieted. THank you. Now, there is this > > 114: foreach( sort( keys( %freqidx ) ) ) { > 115: print( "$_|" ); > 116: print( "$_|" ) foreach( @{$freqidx{$_}} ); > 117: print( "\n" ); > 118: } > > > I get

RE: directory tree minus certain directories

2002-02-08 Thread Timothy Johnson
I would just cower in fear of having to deal with whatever the vendor hands you. :) -Original Message- From: John [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 10:17 AM To: [EMAIL PROTECTED] Subject: RE: directory tree minus certain directories At Friday, 8 February 2002,

Re: print, sleep, print.....

2002-02-08 Thread Chas Owens
It is probably better to say { #limit the scope of the change to $| local($|) = 1; while (1) { $count++; print "${count}\r"; } } On Fri, 2002-02-08 at 13:36, Jason Purdy wrote: > I saw this too and immediately thought of flushing... > > Tr

RE: Wierd Error

2002-02-08 Thread Balint, Jess
That errors seems to be quieted. THank you. Now, there is this 114: foreach( sort( keys( %freqidx ) ) ) { 115: print( "$_|" ); 116: print( "$_|" ) foreach( @{$freqidx{$_}} ); 117: print( "\n" ); 118: } I get the error: Use of uninitialized value at ../20020128/pasu

Re: print, sleep, print.....

2002-02-08 Thread Jason Purdy
I saw this too and immediately thought of flushing... Try adding this before you go into the while loop: $|++; Jason If memory serves me right, on Friday 08 February 2002 12:50, James Kelty wrote: > While looking over the 'print over prior print' thread, I found that, as it > should be, perl w

RE: Wierd Error

2002-02-08 Thread Chas Owens
Looks like it. I ran perl -e '$i = 1; $j = undef; print $i + $j, "\n"' and got 1 then perl -we '$i = 1; $j = undef; print $i + $j, "\n"' and got Use of uninitialized value in addition (+) at -e line 1. 1 and finally perl -we '$i = 1; $j = undef; no warnings; print $i + $j, "\n"' and got

Re: change NT password through browser

2002-02-08 Thread John
No, not cool. It's an intranet page, so it shouldn't be so bad. Also I assume I could write javscript or whatever to encrypt, hopefully there is a standard function? At Friday, 8 February 2002, "Matthew Peter Lyon" <[EMAIL PROTECTED]> wrote: >so, wait, you want to pass a plain text pass. thr

Re: change NT password through browser

2002-02-08 Thread Matthew Peter Lyon
so, wait, you want to pass a plain text pass. through the internet ? i don't think that's so cool. - Original Message - From: "John" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 08, 2002 10:25 AM Subject: change NT password through browser > Anyone know if there

RE: Data conversion

2002-02-08 Thread Joshua Colson
You could probably do it with something like this. my %month = ( Jan => '01', Feb => '02', Mar => '03', Apr => '04', May => '05', Jun => '06', Jul => '07', Aug => '08', Sep => '09',

RE: Copy for Access Tables?

2002-02-08 Thread Brett W. McCoy
On Fri, 8 Feb 2002, Ned Cunningham wrote: > I guess this means nobody knows anyway to do this??? With Perl, you can manipulate Access tables using DBI and the DBD::ODBC driver. But if Access is not loaded on the system, you could have trouble if you don't have the correct ODBC driver for Ac

Re: Wierd Error

2002-02-08 Thread Brett W. McCoy
On Fri, 8 Feb 2002, Balint, Jess wrote: > Hello all. I am getting wierd errors on the following piece of code. > > > 95:for( 0..$#vars ) { > 96:if( defined( $vars[$_] ) ) { > 97:$freqidx{$key}[$_] += $fields[$vars[$_]]; > 98:} > 99:

change NT password through browser

2002-02-08 Thread John
Anyone know if there is a way to do this with Perl? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

How Decompose Hash of Arrays

2002-02-08 Thread Hewlett Pickens
After creating a "Hash of Arrays", how can I later access the individual elements of the Array values? Have tried various constructs from "Programming Perl", and "Perl Cookbook", but can't extrapolate them into code that works - probably because my brain is fossilized. Thanks, Hew Hewlett M.

RE: Wierd Error

2002-02-08 Thread Balint, Jess
The only concern I have with that is that there will always be different types of data coming into the script. Is there any way to test (regex?) for a non-digit character in the first position set then 0? $freqidx{$key}[$_] += $fields[$vars[$_]] unless( $vars[$_] =~ /^\d/ ); Would somet

Re: Wierd Error

2002-02-08 Thread Chas Owens
Obviously you have been a good programmer and turend on warning (either with -w or use warnings). What you are seeing is not an error; it is a warning. Warnings are good because they help you find places where you did something wrong, but sometimes you do mean to do a dangerous thing. In those

RE: Copy for Access Tables?

2002-02-08 Thread Ned Cunningham
I guess this means nobody knows anyway to do this??? -Original Message- From: Ned Cunningham [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 11:21 AM To: '[EMAIL PROTECTED]' Subject:

RE: directory tree minus certain directories

2002-02-08 Thread John
At Friday, 8 February 2002, Nikola Janceski wrote: >Use File::Find in V5.6.1 of perl or higher. I gotta go with what the vendor ships. This version doesn't seem to have CGI Vars either, which would be really handy. Anyone know what the approximate build date for this would be? Any issues r

RE: Wierd Error

2002-02-08 Thread Balint, Jess
Is there any way to correct this without removing warnings and strict? -Original Message- From: Nikola Janceski [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 1:14 PM To: 'Balint, Jess' Subject: RE: Wierd Error you have warnings and or use strict in your code on. -Origi

RE: directory tree minus certain directories

2002-02-08 Thread Nikola Janceski
Use File::Find in V5.6.1 of perl or higher. -Original Message- From: John [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 12:56 PM To: [EMAIL PROTECTED] Subject: directory tree minus certain directories Is this the right/best way to do this? I wanted to use File::Find but c

Data conversion

2002-02-08 Thread Busse, Rich
I'm working with some log file entries that look like: BDE Monitor End - Wed Jan 30 08:36:28 2002 I need to turn the time stamp part of it into: 2002 01 30 08 36 28 Are there modules available for this type of conversion? Would Date::Manip be a good choice? -- To unsubscribe, e-mail: [EMAIL

Wierd Error

2002-02-08 Thread Balint, Jess
Hello all. I am getting wierd errors on the following piece of code. > 95:for( 0..$#vars ) { 96:if( defined( $vars[$_] ) ) { 97:$freqidx{$key}[$_] += $fields[$vars[$_]]; 98:} 99:} @vars are all numberic values and some value

directory tree minus certain directories

2002-02-08 Thread John
Is this the right/best way to do this? I wanted to use File::Find but couldn't figure out how to exclude directories. I want to display a directory tree, but I don't want to display the directories called WORKAREA, STAGING, EDITION, or .raw, and I don't want to search those directories for s

Re: print, sleep, print.....

2002-02-08 Thread Chas Owens
Look at perldoc -q flush. On Fri, 2002-02-08 at 12:50, James Kelty wrote: > While looking over the 'print over prior print' thread, I found that, as it > should be, perl will print out as fast as it can. Below code > > #!/usr/bin/perl -w > > $count = 1; > > while(1) { > $count++; >

print, sleep, print.....

2002-02-08 Thread James Kelty
While looking over the 'print over prior print' thread, I found that, as it should be, perl will print out as fast as it can. Below code #!/usr/bin/perl -w $count = 1; while(1) { $count++; print "${count}\r"; } So? Great, right? Well, what if I want to slow if down with a sleep

RE: Perl variable - cuts

2002-02-08 Thread Mark Anderson
$num = 2001090701; if ($num =~ /(\d{8})(\d{2})/) { $fday = $1; $incr = $2; print "fday = $fday \t incr = $incr \n"; } else { print "$num is not in correct format\n"; } The regular expression /(\d{8})(\d{2})/ looks for 8 digits followed by 2 digits and stores the results (d

RE: print over prior print

2002-02-08 Thread McCollum, Frank
in perl... $count++; print "${count}\r"; -Original Message- From: Jesse Ahrens [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 12:12 PM To: [EMAIL PROTECTED] Subject: print over prior print I recall doing this in C a long long time ago, but I've forgotten most of my C. Is it

Perl variable - cuts

2002-02-08 Thread HURT, CHRIS [Non-Pharmacia/1000]
Hi all; Got a newbie question for you. I have a number of exactly 10 digits (2001090701) and I want to be able to read it from a file, cut the first 8 digits from the last two digits and put each into a variable (for comparison and addition). I would do it in the korn shell like this: NUM=`gre

RE: print over prior print

2002-02-08 Thread Nikola Janceski
print "First number\r"; print "Second number\n"; ## this has too be longer than the first it overwrites what was there. -Original Message- From: Jesse Ahrens [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 12:12 PM To: [EMAIL PROTECTED] Subject: print over prior print I rec

print over prior print

2002-02-08 Thread Jesse Ahrens
I recall doing this in C a long long time ago, but I've forgotten most of my C. Is it possible and how would you print say an integer from a count++ and have the next increment print over the last? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Re[2]: objects and hash

2002-02-08 Thread Jenda Krynicky
From: Roman Fordinal <[EMAIL PROTECTED]> > Friday, February 08, 2002, 2:26:47 PM, you wrote: > > >> :.. Roman Fordinal > >> :.. project manager > > ML> Well, as a Project Manager you should, perhaps, be a bit more > specific ML> about w

Copy for Access Tables?

2002-02-08 Thread Ned Cunningham
Hi, I have 2 tables in an Access mdb that I need to distribute to 500 remote sites. I would need to copy the tables into an existing mdb that does not have Access loaded on the system. Can this be done with PERL? Is there a way to copy the tables in a PERL script? Thankx -- To unsubscribe

Re: execute dynamic block of code

2002-02-08 Thread Jeff 'japhy' Pinyan
On Feb 8, John said: >On Feb 7, Jeff 'japhy' Pinyan said: > >> ($func, $fname, @args) = ( >>"UCM::ucmPiperNewsDB", >>\&UCM::ucmPiperNewsDB, >>$file, uc("INTERNET_$env"), $script, >> ); >> >> print "Simulating $func(@args)\n"; Ick. My brain switched $func and $fname. It would mak

Re: @ARGV and getopts

2002-02-08 Thread Jenda Krynicky
From: "Pfeiffer, Richard" <[EMAIL PROTECTED]> > I have what I think is a trick question and is causing me a bit of > trouble: > > My command line looks similar to this: > command.pl-r"z:\Tech Team" -p"/Tools Team" -f"File Found > Today.txt" -v"RDP 1.2_A" > > What I'm tr

Re: Seeking perlish workaround for problem with filehandle-tying in the camel

2002-02-08 Thread Jenda Krynicky
From: Christian Millour <[EMAIL PROTECTED]> > the Shout.pm and demonstration code in pperl3 pp 385-389 elicit a > rather obfuscated error message "Can't use an undefined value as > filehandle reference at ..." under 5.6.1 (activeperl / cygwin). > > Following is a minimal illus

Re: Other ways to send mail with perl?

2002-02-08 Thread Jenda Krynicky
From: Nikola Janceski <[EMAIL PROTECTED]> > I currently use Mime::Entity to send mail with attachments but I have > to pipe to 'sendmail' regardless. > > Any ideas if there is an alternative mailing program or module to send > mail without using 'sendmail'? > > I send mail on

Re: Getting mail with Perl

2002-02-08 Thread Chris Zampese
Try the Mail::Pop3Client. It is available from CPAN I think. You should be able to use this to get your messages. The following code is used to print the headers of all your emails. This is straight from example code on the Mail::Pop3Client site (cant remember the address sorry, but just tytyp

Re: execute dynamic block of code

2002-02-08 Thread John
On Feb 7, Jeff 'japhy' Pinyan said: > ($func, $fname, @args) = ( >"UCM::ucmPiperNewsDB", >\&UCM::ucmPiperNewsDB, >$file, uc("INTERNET_$env"), $script, > ); > > print "Simulating $func(@args)\n"; I was trying to avoid the multiple variables, and specifically having to change two s

Re: Looking for Mod 10 check digit routine

2002-02-08 Thread Brent Michalski
A quick jaunt over to http://search.cpan.org reveals Search: mod10 --- no results. Search: credit RESULTS! Give the Business::CreditCard module a try. Actually, it is what I use quite often... Good luck! Brent

Looking for Mod 10 check digit routine

2002-02-08 Thread Richard.C.1
Can anyone refer me to where I might be able to find the code to do a mod 10 check digit calculation so that I can use it as a guide in creating a subroutine to do that? I have the info and theory but need an example to see how it's actually done. Thanks! -- To unsubscribe, e-mail: [EMAIL PROTE

RE: append local file to remote file

2002-02-08 Thread Bob Showalter
> -Original Message- > From: Alex Harris [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 07, 2002 3:08 PM > To: [EMAIL PROTECTED] > Subject: append local file to remote file > > > Apologies for the loosely interpreted perl issue below. > > I have rsh on my system and nothing else

Getting mail with Perl

2002-02-08 Thread Jerry Preston
Hi, I what to be able to check and read mail, is this possible with PERL? If so, what, where do I need to look, read and learn? Thanks, Jerry -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: $ENV{'HTTP_USER_AGENT'

2002-02-08 Thread Kliment Ognianov
Bernd Lach wrote: >Hi there, > >I have a problem in detecting any kind of environment >variables. > >I always get a premature script error , when I launch sth like >this. > > >#!C:/Perl/bin/perl.exe -w >use diagnostics; >use strict; > >use CGI; > >$browser = $ENV{'HTTP_USER_AGENT'}; > >if ($

Re: $ENV{'HTTP_USER_AGENT'

2002-02-08 Thread Jeff 'japhy' Pinyan
On , Bernd Lach said: >#!C:/Perl/bin/perl.exe -w >use diagnostics; >use strict; You're using strict and -w, good. >use CGI; > >$browser = $ENV{'HTTP_USER_AGENT'}; Oops. You didn't declare $browser. my $browser = $ENV{HTTP_USER_AGENT}; -- Jeff "japhy" Pinyan [EMAIL PROTECTED] ht

Re: Replacing text in only certain sections of a file.

2002-02-08 Thread Jeff 'japhy' Pinyan
On Feb 8, Steven M. Klass said: >I am having some problems and I can't seem to get it right. In short, I >want to only modify text in a specific section. That section is denoted >by the following > >*DESCRIPTION > > > >*END > This sounds like a job for the .. operator. Let's see. >Here is w

$ENV{'HTTP_USER_AGENT'

2002-02-08 Thread Bernd Lach
Hi there, I have a problem in detecting any kind of environment variables. I always get a premature script error , when I launch sth like this. #!C:/Perl/bin/perl.exe -w use diagnostics; use strict; use CGI; $browser = $ENV{'HTTP_USER_AGENT'}; if ($browser =~ /Mozilla/) { # # Netscape #

RE: How do I get trim or rounding on a float number ?

2002-02-08 Thread Jeff 'japhy' Pinyan
[Please do not top-post -- it makes the conversation difficult to follow] On Feb 8, John Edwards said: >>From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]] >> >>If you're REALLY worried about whether 12.345 rounds to 12.34 or 12.35, >>then you should use a specific rounding function, but if no

Replacing text in only certain sections of a file.

2002-02-08 Thread Steven M. Klass
Hi all, I am having some problems and I can't seem to get it right. In short, I want to only modify text in a specific section. That section is denoted by the following *DESCRIPTION *END Here is what I have. I know the problem, I am reading this line by line so when I find the

RE: How do I get trim or rounding on a float number ?

2002-02-08 Thread John Edwards
Ah. Reading this I realised that while the number you gave (24.97) will round to 25.00 using sprintf, not all number will round as expected using that methos. Instead you can use this (which does appear to work). $number = "12.345"; # Round this number $n = 2;

RE: Other ways to send mail with perl?

2002-02-08 Thread Nikola Janceski
Please keep in mind the I already have working e-mailer... I am looking for one that can create e-mails with outlook properties (ie. flags with due dates, meetings, etc.) I have looked into POSTIE, but that's not going to be enough for me. Any other ideas? (I wish I new the protocols that Outlook

flock() failure - possible Perl compile problem?

2002-02-08 Thread Richard Smith
Hi Folks, I posted this awhile back, but then had problems with my mailer and saw no responses. I have also attempted to clarify the froblem. When I run the following program under Linux ( Red Hat 7.1, Perl 5.6.0 ) it works fine. If I run the program under Solaris, it fails with "Bad File Numbe

RE: How do I get trim or rounding on a float number ?

2002-02-08 Thread John Edwards
Well, do you want to round or trim? The number you mention rounded to 2dp would be 25.00. Trimmed to 2dp would be 24.99. To round the number you could do this $number = "24.97"; $rounded = sprintf "%.2f",$number; print $rounded; To trim you could do $number = "24.97"; ($rounded) = $num

Re: How do I get trim or rounding on a float number ?

2002-02-08 Thread Jeff 'japhy' Pinyan
On Feb 8, FLAHERTY, JIM-CONT said: >some times comes up with 24.97 . I would like to round or trim to >24.99 for example . any Ideas ?? perldoc -q round will tell you about whether or not Perl has a rounding function. If you're REALLY worried about whether 12.345 rounds to 12.34 or

  1   2   >