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
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
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
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
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 =
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
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
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
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
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
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
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
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
--
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
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
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 () {
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
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
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
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
> 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
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
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
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
--- 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
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
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
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
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 ";
>
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
>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
> -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
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 ?
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
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
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
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//;
--
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
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]]
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
> 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
--- "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
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
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
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
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"
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.
> -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
-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
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
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
--- "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
> --
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
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]
--- 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
55 matches
Mail list logo