ftp login

2001-08-03 Thread Sparkle Williams
I'm trying to get my program to retrieve a file through ftp. However I keep getting the error "can't call method login" for the following line: '$ftp->login( $username , $password )' and doesn't retrieve the file. I can't see where I made an error in this line. Any ideas? Thanks

Re: Fun With Perl list ???? where is it ? :)

2001-08-03 Thread Abdulaziz Ghuloum
Hello, I think perlmonks.com comes close to what you want but not exactly. Check it out anyways. Aziz,,, In article <[EMAIL PROTECTED]>, "Silvio Luis Leite Santana" <[EMAIL PROTECTED]> wrote: > Hi all > Is there actually a Fun With Perl list? (ok, this list is funny already, > but not officia

Re: y me

2001-08-03 Thread Dave Hoebe
Hi Peter, Are you trying to make a CGI script ? in that case try putting: print "Content-type: text/html\n\n"; before the first print statement. a good idea when writing scripts would be using the -w flag after #!/usr/bin/perl, this flag enables a more verbose error output. Could be handy troub

Using the split function in creation of Hash

2001-08-03 Thread Johnson, Fred
Title: Using the split function in creation of Hash I have been attempting to create a hash using the split function, but I haven't been successful identifying the correct regex that will split my data in the manner that I need it. This is a sample of the data that I need to create a list to p

Help with Net::Telnet module

2001-08-03 Thread S. Johnson
I am looking for some help debugging a problem with the Net::Telnet module written by Jay Rogers. Here's the subroutine I am having problems with: sub login { $errmode = 'return'; $hostaddress = 'xxx.xxx.xxx.xxx'; $prompt = '/Sheldon_NS16>/'; $username = ''; $password =

Re: perl debugger

2001-08-03 Thread Elaine -HFB- Ashton
Ruth Albocher [[EMAIL PROTECTED]] quoth: *>hi all. *>Is there any good stable graphic debugger for perl? There are several, depending on your platform. Go out and get "Perl Debugged" by Peter Scott as it covers the Perl debugger and the tools very well. http://www.bookpool.com/ has excellent pri

Re: y me

2001-08-03 Thread Brent Michalski
Heehee, I have seen this before and it is enough to drive a person crazy! Add a \n to the end. So you have... print ("hello world.\n"); I bet that this "fixes" your program... Brent

[OT] stepping out

2001-08-03 Thread Paul
Since I may be completely incommunicado for the next few weeks on emergency duty at work, I'm going to put an autoreply on my email. Since I don't want my autoreply spamming the list, I'm going to unsubscribe. If anyone wants me for anything, please feel free to write to me directly. In either ca

How to retrieve filesystem size ?

2001-08-03 Thread Vincent Bouttier-Deslandes
Hi, Does anybody know how I can get a filesystem (or drive) size and free space ? I haven't see any module with a function to do that. Thanks. -- Vincent Bouttier-Deslandes ([EMAIL PROTECTED]) Responsable du pôle Outils/Sécurité Tel: +33.3.28.37.78.47 - Fax : +33.3.20.67.58.43 -- To unsubs

Re: memory for implied array/list read

2001-08-03 Thread Michael Fowler
On Thu, Aug 02, 2001 at 11:55:35AM -0700, Paul wrote: > > --- Michael Fowler <[EMAIL PROTECTED]> wrote: > > AFAIK, print is not special-cased to read chunk by chunk. In > > fact, it's more ineffecient than simply slurping the entire file in > > and then printing it. The syntax is equivalent to

Re: Can Perl be used to develop test scenarios?

2001-08-03 Thread Greg Matheson
On Wed, 01 Aug 2001, Carl Rogers wrote: > I'm trying to find out if it is possible to write a Perl script > that can "mimic" user input. > I'm trying to write a scenario in which a user responds to a pop-up window > then hits the "enter" button. Following that, the user populates different > f

Re: Reading file line by line regardless of type of end-of-line?

2001-08-03 Thread Michael Fowler
On Fri, Aug 03, 2001 at 01:40:30PM -0700, [EMAIL PROTECTED] wrote: > > Michael Fowler <[EMAIL PROTECTED]> said: > > > You left out the Macintosh EOL sequence, , and I don't know what > > uses simply as EOL. > > Macs use just . No machine that I know of uses as a line > terminator. Right, th

Re: How to retrieve filesystem size ?

2001-08-03 Thread Michael Fowler
On Fri, Aug 03, 2001 at 04:02:31PM +0200, Vincent Bouttier-Deslandes wrote: > Does anybody know how I can get a filesystem (or drive) size and free > space ? You can use the aforementioned `df`, Filesys::DiskSpace, Filesys::Df, Filesys::DiskFree, Filesys::statfs, or Filesys::Statvfs. Michael --

Fun With Perl list ???? where is it ? :)

2001-08-03 Thread Silvio Luis Leite Santana
Hi all Is there actually a Fun With Perl list? (ok, this list is funny already, but not officially :) ) I think I learn better when I'm having fun (that's why I think so easy to learn Perl reading the camel book, and learning everything else by the o'reilly books) If there isn't a list, perhaps

Re: If Statement won't work

2001-08-03 Thread Carl Rogers
At 11:22 AM 8/2/2001 -0500, [EMAIL PROTECTED] wrote: >Can anyone tell me why my if statement refuses to work? It is really >simple. I can't understand it. > >$winner = 1; >if($winner == 1){ >print "$winner\n"; >} Are you expecting the word "winner" to appear??? I've sometimes got so lost in c

RE: Reading file line by line regardless of type of end-of-line?

2001-08-03 Thread Steve Howard
This is really ugly, but if you have the memory to handle a file that might only use \r, and you don't mind using a temp file for the processing, here is one possibility. open(file, "c:/blah/sample.txt") || die "$!\n"; open(tempfile, ">c:/blah/temp.txt") || die "$!\n"; foreach () {

Re: sort

2001-08-03 Thread Michael Fowler
On Fri, Aug 03, 2001 at 05:46:03PM -0400, F.H wrote: > I am trying to sort on cities but it doesn't seem to yield the right sort: > here is my code snippet: > foreach $country ( keys %world){ > > foreach $city ( sort keys %{$world{$country}}) { > > foreach my $street ( k

Re: unneeded space

2001-08-03 Thread Peter Scott
At 07:08 PM 8/3/01 -0500, Steven Shepard wrote: >i have the contents of a .txt file i am including into a textarea. each >address in the txt file is on a line of its own, but when it gets included >in the the textarea line one is fine, but every line after that has a >space after it. You mean

regular expression

2001-08-03 Thread Messervy, Joe M
I wrote a small script that goes on to various machines greps for certain events and logs them (I am using plain shell scripting for this). I need to know what machine these events occur so I did an echo $host >> myfile then echo grep results >> myfile. Now I want to call a perl script that wil

Write To DB?

2001-08-03 Thread Rebecca Sudduth
Hello! I know next to nothing about Perl, so please forgive me if I ask any stupid questions. I have this chat script written in Perl that I'd like to set up just for a few friends to use. It has a list of the current chatters that you can check so you know who else is in the room with

Re: Perl: How do I count Lines?

2001-08-03 Thread smoot
> Thomas Burkhardt <[EMAIL PROTECTED]> said: > Greetings Perl Gurus! > Using Perl, how do count the number of lines in a given file? > > I know how to run the code: > > open(MYPIPE, "|wc -l"); > print MYPIPE "apples\npears\npeaches\n"; > close MYPIPE; If you want to simply print the number of

Re: Load Average Perl Script

2001-08-03 Thread Elaine -HFB- Ashton
Graham White [[EMAIL PROTECTED]] quoth: *>Does anyone have an example of a perl script that constantly loops checking *>the machines loadaverage, if the loadaverage is higher than a certain number *>then the script will shutdown and restart a program like apache. Thanks! If this is on Solaris, I

Re: Confusion with hash reference and Mail::IMAPClient

2001-08-03 Thread Peter Scott
At 01:52 PM 8/3/01 -0800, Michael Fowler wrote: >On Fri, Aug 03, 2001 at 01:40:33PM -0700, Peter Scott wrote: > > How odd. All I can suggest is that you get the latest one. Vide: > >What I meant by it not dumping globs is that the glob data structure cannot >be recovered by eval'ing the code, as

Re: Confusion with hash reference and Mail::IMAPClient

2001-08-03 Thread Michael Fowler
On Fri, Aug 03, 2001 at 11:17:45AM -0700, Peter Scott wrote: > At 10:13 AM 8/3/01 -0700, Matthew Lyon wrote: > >is there and easy way to dump ALL data structures established by the > >currently-running Perl script? > > You can access all package variables through the stash, i.e., just print > Du

Re: memory for implied array/list read

2001-08-03 Thread Paul
--- Michael Fowler <[EMAIL PROTECTED]> wrote: > On Thu, Aug 02, 2001 at 09:20:43AM -0700, Paul wrote: > > print ; > > > > If IN is accessing a large file, does the second syntax try to > > slurp the whole thing into memory before printing it? Or is there > > some internal optimization that dol

Reading file line by line regardless of type of end-of-line?

2001-08-03 Thread Sherlock Holmes
I would like to create a perl script that reads lines from an ascii file, but that reads them regardless of whichever of the three variants (, or ) is actually in use as end-of-line, *without* knowing beforehand which is the case. The script should run on many systems (so installing a special

sort

2001-08-03 Thread F.H
Hi there, I am trying to sort on cities but it doesn't seem to yield the right sort: here is my code snippet: foreach $country ( keys %world){ foreach $city ( sort keys %{$world{$country}}) { foreach my $street ( keys %{$world{$country}{$city}} ANybody know what's wron

RE: ftp login

2001-08-03 Thread Sparkle Williams
Here's a copy of the script up until the login error : #!/usr/bin/perl -w print "Enter the full name of the file you are looking for:\n" ; chomp ($url= ); if ($url =~ m|http://|i) { print " You have chosen a file of type HTTP! "; #use perl -MLWP

Re: can't able to understand this behaviour of Getopt::Long

2001-08-03 Thread Michael Fowler
On Fri, Aug 03, 2001 at 04:05:33PM +0530, Rajanikanth Dandamudi wrote: > - > #!/usr/local/bin/perl > use Getopt::Long; > > my $filename; > print "Before : ARGV = @ARGV\n"; > $ret = GetOptions('abc=s' =>\$filename); > print "Return value = $ret "; >

RE: number of line

2001-08-03 Thread Fennelly, Marion [ETHGB]
Hello This is my way of doing it, but perhaps it is too longwinded: If the line is contained in a text file, you read the file into an array. Then each element of the array consists of a single line. Search for the line and get its index, which corresponds to the line number -1. Regards, Mario

Re: Security

2001-08-03 Thread Peter Scott
>although I am not really knew to programming I never bothered about >security. I know that > >perldoc perlsec > >provides information about security, but I don't understand half of what I >am reading. Does anyone know where I can find good tutorials for beginners? Please provide more informatio

RE: Any good perldoc viewer?

2001-08-03 Thread Bob Showalter
> -Original Message- > From: Will Muir [mailto:[EMAIL PROTECTED]] > Sent: Friday, August 03, 2001 10:10 AM > To: [EMAIL PROTECTED] > Subject: Any good perldoc viewer? > > > > Is there such a thing as a good perldoc viewer, I guess what > I mean is there something other then the dos pro

Re: How to retrieve filesystem size ?

2001-08-03 Thread Ron Smith
Is this for PC or UNIX?? The following basic works for UNIX: print (`df -k`); # use backquotes Chapter 14 (Process Management) in "Learning Perl". Ron >From: Vincent Bouttier-Deslandes <[EMAIL PROTECTED]> >To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> >Subject: How to retrieve filesystem size ?

RE: Confusion with hash reference and Mail::IMAPClient

2001-08-03 Thread Matthew Lyon
is there and easy way to dump ALL data structures established by the currently-running Perl script? On Fri, 3 Aug 2001, Wagner Jeff Civ Logicon/TTMS wrote: > Hi, > > In the absence of an answer from the more experienced list members, I'll > give it a shot. I don't know what kind of structure is

RE: Confusion with hash reference and Mail::IMAPClient

2001-08-03 Thread Wagner Jeff Civ Logicon/TTMS
Hi, In the absence of an answer from the more experienced list members, I'll give it a shot. I don't know what kind of structure is being returned, but maybe you can use the Data::Dumper module to format the output, inserting the following two lines (in the appropriate places). use Data::Du

RE: input output append

2001-08-03 Thread Paul
WARNING -- careful with this. > Try > > $Directory= Assuming the above was pseudocode, > $file="$directory.$file.txt"; # don't forget to add "\" between dir > # and file The above will put .'s in your filename. Replace the .'s wit

RE: regular expression

2001-08-03 Thread Jeff 'japhy/Marillion' Pinyan
On Aug 2, Messervy, Joe M said: >Ok, I feel stupid the test should have been perl -p -i -e 's/\nmachine//g' >myfile ... but it still doesnt work :( Well, $_ is only ONE LINE of the file. So it can't possibly start with a newline and then have other text. Perhaps you want s/^machine//; --

input output append

2001-08-03 Thread F.H
HI, anyone knows the right syntax for reading and writing (appending) to a file. I tried this and it didn't seem to work open (FH,"+< file.txt" ) Thanks I.S __ Your favorite stores, helpful shopping tools and great gift ideas. Ex

RE: ftp login

2001-08-03 Thread John Edwards
Here's an example script from the Net::FTP docs use Net::FTP; $ftp = Net::FTP->new("some.host.name"); $ftp->login("anonymous","[EMAIL PROTECTED]"); $ftp->cwd("/pub"); $ftp->get("that.file"); $ftp->quit; HTH John -Original Message- From: Sparkle Williams [mailto:[EMAIL PROTECTED]]

RE: ftp login

2001-08-03 Thread John Edwards
have you got use Net::FTP; at the top of your script?? John -Original Message- From: Sparkle Williams [mailto:[EMAIL PROTECTED]] Sent: 03 August 2001 14:54 To: [EMAIL PROTECTED] Subject: ftp login I'm trying to get my program to retrieve a file through ftp. However I keep getting th

RE: problem with concatenation

2001-08-03 Thread Robin Lavallee (LMC)
> Here is an extract of my code: > > 1>$chaine2=""; > 2>$chaine3=""; > 3>$chaine4=""; > 4>for($i=0;$i<$cpt;$i++) > 5>{ > 6>$chaine2=" SIZE=2 COLOR=#FF8C52>\n"; > 7>$chaine3=$titre[$i]; > 8>$chaine4 = $chaine2.$chaine3; > 9>print TEMP $chaine4; > 10>} > > There is a problem w

Re: Certification

2001-08-03 Thread Paul
--- "Shepard, Gregory R" <[EMAIL PROTECTED]> wrote: > I was looking online for information on Perl Certification but only > found people discussing it, and not where to get it. > Is certification available? The short answer is "no". =o) At least not that I know. > And who provides the most vali

problem with concatenation

2001-08-03 Thread COLLINEAU Franck FTRD/DMI/TAM
Here is an extract of my code: 1>$chaine2=""; 2>$chaine3=""; 3>$chaine4=""; 4>for($i=0;$i<$cpt;$i++) 5>{ 6> $chaine2="\n"; 7> $chaine3=$titre[$i]; 8> $chaine4 = $chaine2.$chaine3; 9> print TEMP $chaine4; 10>} There is a problem with line 8; the message is :"Use of uniniti

File Handling question - easy

2001-08-03 Thread Jon
I don't know if I sent my first email correctly. Sorry for the repeat if I did, I'm new :) Hello, The code below takes all files in my current directory that have filenames ending with ".txt". Using this stuff I can loop through those files and do what I need to do. My problem is, I want to

Re: Valid DB Handle Assertion Test

2001-08-03 Thread Michael Fowler
On Thu, Aug 02, 2001 at 09:44:00AM -0400, [EMAIL PROTECTED] wrote: > Can I test for the existence of a method without actually calling it? Yes, see my first question, and the solution to the problem. > Basically what I'm trying to do is to verify that $dbh is still a valid > handle. This soun

can't able to understand this behaviour of Getopt::Long

2001-08-03 Thread Rajanikanth Dandamudi
Hello, I am not able to understand the following behaviour of perl Getopt::Long. Here is the snippet of code that I am not able to understand: Start of code - #!/usr/local/bin/perl use Getopt::Long; my $filename; print "Before : ARGV = @ARGV\n"

Re: File Handling question - easy

2001-08-03 Thread Michael Fowler
On Thu, Aug 02, 2001 at 03:00:24PM -0400, Bob Showalter wrote: > I played around with this a bit and found that: > >perl -e 'print scalar(glob("*")) for (1..2)' > > prints two different files, while > >perl -e 'print scalar(glob("*")), scalar(glob("*"))' > > prints the same file twice.

RE: File Handling question - easy

2001-08-03 Thread Bob Showalter
> -Original Message- > From: Michael Fowler [mailto:[EMAIL PROTECTED]] > Sent: Thursday, August 02, 2001 2:48 PM > To: Bob Showalter > Cc: [EMAIL PROTECTED] > Subject: Re: File Handling question - easy > > > On Thu, Aug 02, 2001 at 02:31:28PM -0400, Bob Showalter wrote: > > P.S. I'm surp

RE: perl debugger

2001-08-03 Thread Crowder, Rod
-Original Message- From: Ruth Albocher [mailto:[EMAIL PROTECTED]] Sent: 02 August 2001 10:56 To: [EMAIL PROTECTED] Subject: perl debugger hi all. Is there any good stable graphic debugger for perl? thanks Try the one in the ActiveState Perl Dev Kit. You can do

Re: Pipe to a command

2001-08-03 Thread Brett W. McCoy
On Thu, 2 Aug 2001, Hal Wigoda wrote: > How do you run a command on a unix box > from a perl script > and capture the results?? > > Like a grep command?? The backtick operator is the most common way (be careful doing this for commands that have a lot of output, because it all goes into a single

Net::Telnet

2001-08-03 Thread Farid IZEM
Hello, my name is Farid. I am currently testing the Perl Telnet Object. I meet some problems specifying my prompt parameter object. My prompt shell looks like : HOSTNAME where HOSTNAME is the name of my unix computer et LOGNAME the user logname. This is how i've specified my prompt in yopur obj

RE: input output append

2001-08-03 Thread Paul
--- "Shepard, Gregory R" <[EMAIL PROTECTED]> wrote: > Thanks for correcting this - You are correct... > I wasn't thinking about append. Actually, I was thinking about just > writing to another file. > My sincere apologies Understood. Hope I didn't come off as too much of a jerk. =o) Paul > --

Re: boolean logic - what am I doing wrong?

2001-08-03 Thread Ken
You forgot the attlist[$x] =~ before the second match. - Original Message - From: "Ron Woodall" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 02, 2001 10:51 AM Subject: boolean logic - what am I doing wrong? > Hi All: > > A bit of a conundrum here. > > while (att

Re: input output append

2001-08-03 Thread Carl Rogers
Good afternoon; >HI, >anyone knows the right syntax for reading and writing (appending) to a file. >I tried this and it didn't seem to work >open (FH,"+< file.txt" ) Try: open (FH,">> file.txt" ) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

splice with array-elements (HELP)

2001-08-03 Thread GRANATA ROBERTA
--- Erhalten von ZBM.ZAGTA 089/32000-414 02-08-01 10.56 --- Erhalten von ZBM.ZAGTA 089/32000-414 02-08-01 10.25 Hi All, I have a problem with delete element of array. I have a cycle and if two o more elements of the array are empty, i have to delete it. iI