[Fwd: Condolences to US readers]

2001-09-14 Thread andy
We in South Africa are praying for the people involved in this terrible affair. Best regards Andy Sewell EXKom South Africa I'm very sad of what happened. I'm not able to describe my sadness. I think I'm not far from the truth when I write that all the french people is with you, US nation. It'

Re: control input output and error of unix ftp client

2001-09-14 Thread Todd A. Jacobs
On Fri, 14 Sep 2001, Lakmal Jinadasa wrote: > Our security department has asked to remove all the .netrc files from > home directories. But some of our applications use .netrc for Why not just make the home directories non-world writable? > 2. Write a wrapper for ftp client to read the hostnam

control input output and error of unix ftp client

2001-09-14 Thread Lakmal Jinadasa
Hi, Our security department has asked to remove all the .netrc files from home directories. But some of our applications use .netrc for automatic ftp connection. Since some programs are using ftp client supplied with the OS (solaris) I cannot reintroduce a new ftp client. Using secure ftp is

Re: Regular expression needed

2001-09-14 Thread Todd A. Jacobs
On Fri, 14 Sep 2001, Jorge Goncalvez wrote: > Thanks for your tips Todd but My if is never verified in: > > if ($_==~ /DHCPDISCOVER/ && ) > {.. > } > > althought $_=' dhcpd : LOG_INFO : DHCPDISCOVER from > 02:41:53:20:d0:34:5b:a6:ef:3c:c1:01:01:00:00:00 via eth0. > > Why? Well, my

Re: Matching a pattern only once

2001-09-14 Thread Akshay Arora
> my $filename = $File::Find::name; > if ($filename =~ /(\~){1}$/) { > # do something > } What you are doing here is matching only ~ as the entire filename. You should try $filename =~ /^[~]/ This looks for a character (~ in this case) at the beginning of the string. Since you're not interest

RE: Matching a pattern only once

2001-09-14 Thread Jason Tiller
Hello, Again, Bob, :) On Fri, 14 Sep 2001, Bob Showalter wrote: > You can use look-behind assertion: > >/(? Which means, match a tilde, not preceded by a tilde, anchored to the > end of the string. This will match: >foo~ >~ > > But not: > >foo~~ >~~ I'm trying to understand

Re: Thanks on chomp on to localtime

2001-09-14 Thread Jeff 'japhy/Marillion' Pinyan
On Sep 14, siren jones said: >Where can I get more info on using localtime() function or >POSIX::strftime? perldoc -f localtime For any built-in function, use perldoc -f NAME For the POSIX module, do perldoc POSIX It'll bring up the module's documentation. Search in there for 'strfti

Thanks on chomp on to localtime

2001-09-14 Thread siren jones
Thank you for the detail explaination on chomp! Where can I get more info on using localtime() function or POSIX::strftime? Thanks, again. -s _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- To un

RE: Is there a better way to do this

2001-09-14 Thread Bradshaw, Brian
Thanks guys, but I wound up using this Tuesday: while (%result = $finalSet->fetchhash()) { push @arr_DBanswers, values %result; } -Original Message- From: Curtis Poe [mailto:[EMAIL PROTECTED]] Sent: Friday, September 14, 2001 4:57 PM To: MPM; Bradshaw, Brian Cc: [EMAIL PROTECTED] Subj

Re: Is there a better way to do this

2001-09-14 Thread Curtis Poe
--- MPM <[EMAIL PROTECTED]> wrote: > Look into using the map function. It should leave you with the following > code: > > map {push @arr_DBanswers, $results{$_}} keys %results; > > Scott Scott, Actually, it's usually bad to use map in void context as returns a lot data, merely to throw it awa

Re: what is wrong with this simple format?

2001-09-14 Thread Alexander Bjelke
hmmm, I have testet the script on a machine with perl 5.6 and there it worked. Is the format definitions different in perl 4? Alexander -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Is there a better way to do this

2001-09-14 Thread Sean Pfister
I think this works: @arr_DB answers = values(%result); the array elements won't have any special order however, if that's what you want. sean > -Original Message- > From: MPM [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 14, 2001 1:39 PM > To: Bradshaw, Brian > Cc: [EMAIL PROTEC

Re: chomp question

2001-09-14 Thread Jeff 'japhy/Marillion' Pinyan
On Sep 14, siren jones said: >$date = `/bin/date + %y%m%d`; There's really no need to be calling an external system command to get the date. Perl has its own function, localtime(), and you can use the POSIX::strftime() function to use date-like formatting instructions (the %y and %m stuff). >$

Re: chomp question

2001-09-14 Thread Brett W. McCoy
On Fri, 14 Sep 2001, siren jones wrote: > What is happening here? > > $date = `/bin/date + %y%m%d`; > print "$date"; > > prints > >20010914 > > > > But if I add: > > $a = chomp($date); > print "$a"; > > > it prints >

chomp question

2001-09-14 Thread siren jones
What is happening here? $date = `/bin/date + %y%m%d`; print "$date"; prints >20010914 > But if I add: $a = chomp($date); print "$a"; it prints > What happens to the number? Why doesn't chomp just get rid of

Re: Is there a better way to do this

2001-09-14 Thread MPM
Look into using the map function. It should leave you with the following code: map {push @arr_DBanswers, $results{$_}} keys %results; Scott On Wed, 12 Sep 2001, Bradshaw, Brian wrote: > Another question for the list, > $z = 0; > foreach(@key = keys(%result)) > { >$arr_DBanswers[$z] =

Re: hash of strings

2001-09-14 Thread Jerry Preston
Brett, This! $test{string}{ 1 } = "i am lost"; $test{string}{ 2 } = "what is your name"; foreach $id ( keys %{ $test{string} } ) { print "$id $test{string}{ $id } "; } It works!! :-) Thanks Jerry "Brett W. McCoy" wrote: > On Fri, 14 Sep 2001, Jerry Preston wrote: > > > $test

Re: hash of strings

2001-09-14 Thread Brett W. McCoy
On Fri, 14 Sep 2001, Jerry Preston wrote: > $test{ 1 } = "i am lost"; > $test{ 2 } = "what is your name"; > > > print "1 $test{ 1 } "; # this works > > # but not this! Why?? Is there a better way to write this? > > for( $j = 1; $j < 3; $j++ ) { > foreach $id ( keys %{ $test{ $j } } ) {

hash of strings

2001-09-14 Thread Jerry Preston
Hi! Can I do this? $test{ 1 } = "i am lost"; $test{ 2 } = "what is your name"; print "1 $test{ 1 } "; # this works # but not this! Why?? Is there a better way to write this? for( $j = 1; $j < 3; $j++ ) { foreach $id ( keys %{ $test{ $j } } ) { print "$id $test{ $j }{ $id } "

Re: Math::BigInt

2001-09-14 Thread Richard J. Barbalace
Gibbs Tanton writes: > You might want to try Math::BigFloat instead. I originally wrote: > I'm trying to perform the following calculation: > $value = ($float + $integer) * 10; > $string = "$value:test"; I now have code like the following: use Math::BigFloat; # Initial values my $float =

Win32::FileSecurity::Set() Woes

2001-09-14 Thread David Simcik
Hey folks, To sum things up, I've got two servers: one in an NT Domain and one not in an NT Domain. I would like to set NTFS permissions on shared directories residing on the server in the NT Domain using a Perl/CGI script running off of the other server without a domain. Big Problem. I've

Re: Matching a pattern only once

2001-09-14 Thread Curtis Poe
--- Stefan Rotsch <[EMAIL PROTECTED]> wrote: > Hi, > > I've got trouble with matching a character only once. The function > > my $filename = $File::Find::name; > if ($filename =~ /(\~){1}$/) { > # do something > } > > should be used for deleting temporary files ending with a ~. Because >

RE: Matching a pattern only once

2001-09-14 Thread Bob Showalter
> -Original Message- > From: Stefan Rotsch [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 14, 2001 1:55 PM > To: [EMAIL PROTECTED] > Subject: Matching a pattern only once > > > Hi, > > I've got trouble with matching a character only once. The function > > my $filename = $File::Fi

Re: line end problems - help #2 - SUMMARY

2001-09-14 Thread Ron Woodall
Hi All: My thanks to Curtis Poe, Maxim Berlin, Alessandro Lenzen and Remco Schoeman for contributing to the resolution of this problem. In brief the problem was that I had three different types of line ends (none, UNIX line end and Windows line end) showing up in an HTML page I

Scientific output with DateTime::Precise

2001-09-14 Thread Schooley, Chris
When I run the below code it works, but the epoch date prints in scientific notation. Is there a way I can force this to print in regular notation? I guess I could use a regex but there should be a way just to print something the correct way, no? <-output> >datetime.pl 19980323165814 +890672

Matching a pattern only once

2001-09-14 Thread Stefan Rotsch
Hi, I've got trouble with matching a character only once. The function my $filename = $File::Find::name; if ($filename =~ /(\~){1}$/) { # do something } should be used for deleting temporary files ending with a ~. Because of some special files ending with ~~ I would like to keep the above

Date::Manip acting strange (must be me)

2001-09-14 Thread Schooley, Chris
Hi All, I am working a project that captures images from "web cams" and turns them into an AVI so that you can record things that happen in a different time zone. I am almost done except for the PERL script that lets you set the timer and spawns the recording processes. My problem is tha

Re: Sending a user id and password

2001-09-14 Thread Buffy Press
Michael Fowler wrote: > > On Thu, Sep 13, 2001 at 10:10:01AM -0700, Buffy Press wrote: > > HTTP: Access authorization required. > >Use the -auth=id:pw parameter. > > > > I have looked in my Programming Perl book and other online Perl > > resources and I cannot find any information on -a

Urgently need help with Net::SSH::Perl / Math::Pari / @INC and loadable objects

2001-09-14 Thread Patrik Birgersson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi there! This is my first posting to this mailing list, so plz don't flame me - - ok ;-) Please send your responses to: [EMAIL PROTECTED] Rows will probably wrap. I am trying to use the Net::SSH::Perl module with Perl 5.6.1 on a i686 RH 6.2 Linu

getserbyname?

2001-09-14 Thread P lerenard
Hi, I want to get the first server name or ip that my computer talk to. How I can do that? Thanks Pierre _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- To unsubscribe, e-mail: [EMAIL PROTECTED] F

RE: to remove the file extension

2001-09-14 Thread Bob Showalter
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 13, 2001 8:09 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: to remove the file extension > > > > "Jason" == Jason Tiller <[EMAIL PROTECTED]> writes: > > Bob> perl -e

Re: grep utility

2001-09-14 Thread _brian_d_foy
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (John_kennedy) wrote: > Is this line correct: > @UNLOCKED = grep(!/LOCKED/g, @SAME); you could just as well say @UNLOCKED = grep( !/LOCKED/, @SAME); since you only need to find the string once. > print BOTH @SAME; > print oBOTH @UNLOCKED

grep utility

2001-09-14 Thread John_Kennedy
Is this line correct: @UNLOCKED = grep(!/LOCKED/g, @SAME); I want it to check each line of the array @SAME and print lines that DO NOT contain the string "LOCKED" to the array @UNLOCKED. I later output both arrays to different files: print BOTH @SAME; print oBOTH @UNLOCKED; but when I list the

RE: what is wrong with this simple format?

2001-09-14 Thread pconnolly
As it is, it should work. The error is not always on the line that it is complaining about. Syntax errors such as missing " of ) or } etc. will cause perl to report errors further down the script. Did you check the rest of the script? Or, if you want to send your script we can look at it. |-

what is wrong with this simple format?

2001-09-14 Thread Alexander Bjelke
$date = "somedate"; format AREPORT = @> $date . Im getting the following error: Format not terminated in file ./asts_report.pl at line 39, next char ^? Execution of ./arepo

Re: removing spaces from a file

2001-09-14 Thread Jeff 'japhy/Marillion' Pinyan
On Sep 14, John_Kennedy said: >print oBOTH "@UNLOCKED\n"; > >How can I prevent the blank lines from the grep or how can I remove the >blank lines from @UNLOCKED? This was a recently-added question to the FAQ (in perlfaq5, under the title "Why do I get weird spaces when I print an array of lines?

Re: bless function

2001-09-14 Thread Jeff 'japhy/Marillion' Pinyan
On Sep 14, baby lakshmi said: >package Animal; >sub named { > my $class = shift; > my $name = shift; > bless \$name, $class; >} >sub eat{ > my $class = shift; > $class = ref($class) || $class; > my $food = shift; > print "$class eats $food\n"; >} >In this program i dont understand

removing spaces from a file

2001-09-14 Thread John_Kennedy
I have a script that creates a file using the grep utility against a "master" file. The new file looks like the master file was copied over and where the grep "failed" there is a blank line. The grep line looks like this: @UNLOCKED = grep(!/LOCKED/g, "@SAME\n"); print oBOTH "@UNLOCKED\n"; with

Re: Regular expression needed

2001-09-14 Thread Todd A. Jacobs
On Fri, 14 Sep 2001, Jorge Goncalvez wrote: > dhcpd : LOG_INFO : DHCPDISCOVER from > 02:41:53:20:d0:34:5b:a6:ef:3c:c1:01:01:00:00:00 via eth0 > > How can I do to make the test if this line contains the word DHCPDISCOVER? /DHCPDISCOVER/ && -- Work: It's not just a job, it's an indenture. --

Sending attachments in email

2001-09-14 Thread Rustagi, Dhiraj
Hello, I am using sendmail module to send emails but now I have a new requirement to send two attachments in the email which a user has attached in the form. I don't think sendmail has a capability to do that. What options do I have where I don't have to install a third party product? Thanks in

bless function

2001-09-14 Thread baby lakshmi
hello friends, i have a doubt in the concept of blessing. package Animal; sub named { my $class = shift; my $name = shift; bless \$name, $class; } sub eat{ my $class = shift; $class = ref($class) || $class; my $food = shift; print "$class eats $food\n"; } my $talk

RE: Regular expression needed

2001-09-14 Thread Veeraraju_Mareddi
You can do this like the following. _ $test=' dhcpd : LOG_INFO : DHCPDISCOVER from 02:41:53:20:d0:34:5b:a6:ef:3c:c1:01:01:00:00:00 via eth0'; if($test =~ /DHCPDISCOVER

Re: Regular expression needed

2001-09-14 Thread Jorge Goncalvez
- Begin Forwarded Message - Date: Fri, 14 Sep 2001 11:46:54 +0200 (MEST) From: Jorge Goncalvez Subject: Re: Regular expression needed To:[EMAIL PROTECTED] Mime-Version: 1.0 Content-MD5: BW3TUqtgmcGzRIcQHrT+CQ== Hi, I have this line: dhcpd : LOG_INFO : DHCPDISCOVER from

Re: Remote process

2001-09-14 Thread Dexter Casey
If you use psexec there is a switch -c that will copy your batch file to the client. You could include the psexec command in your perl script and use a foreach loop to hit every machine name that you store in the array.  If you use the -d switch the psexec will not wait for any failures so your s

RE: How to change the @INC contain

2001-09-14 Thread seng-keen . lau
thanks Andrea regard's SK -Original Message- From: Andrea Holstein [mailto:[EMAIL PROTECTED]] Sent: Friday, September 14, 2001 4:00 PM To: [EMAIL PROTECTED] Subject: Re: How to change the @INC contain Seng-Keen Lau wrote: > What is the command line to change the @INC Contain ? > You c

Re: How to change the @INC contain

2001-09-14 Thread Andrea Holstein
Seng-Keen Lau wrote: > What is the command line to change the @INC Contain ? > You can tell perl via -I command to add some paths to @INC. E.g. perl -I./ your_script.pl adds ./ to @INC. Best Wishes, Andrea -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PR