RE: Using ssh for uptime?

2002-12-09 Thread Mark-Nathaniel Weisman
Mark, I've got the code you sent installed and working (or almost working anyway) snippet below: >> foreach my $rec (@machines) { ($host,$user,$pass,$sname) = split(/,/, $rec); open2(*RD_HD, *WR_FH, "ssh -l $user $host $user/@$host uptime") || die "cant fork child"; print

Re: How does the Perl Module called "NET:ftp" logon to an FTP server?

2002-12-09 Thread Ramprasad A Padmanabhan
Hi, I hope other users will excuse me for being so un-perl If I understand you right You have already lots of shell scripts which you will have to convert to perl If you use NET::ftp ( it is Net::FTP if I remember right) save the bother get a ftp module like ncftpget which allows you to l

Re: PERL MODULES PROBLEM

2002-12-09 Thread Ramprasad A Padmanabhan
what is a p-value ? Dario Greco wrote: hi to all, i need to calculate p-value of Student's t-test for many values. i've in input a TAB-delimited txt file in which there are many columns of numbers (they're means of values of alternatively "row data") for thousands of rows. I need in output of

modifying xml entry

2002-12-09 Thread Admin-Stress
Hi, I have a XML file like this : password dccftp 22 127.0.0.1 1234567890 Could you give me a working perl code to modify the entries? user will input from keyboard : FTPServer Username = Password = Port Number = DCCBox IPAddress = Serial

RE: modifying xml entry

2002-12-09 Thread Beau E. Cox
Hi - >Could you give me a working perl code to modify the entries? ... Sorry - that's not the way this list works :) How can you learn if we spoon-feed you? We are more than happy to give you suggestions and point you in productive directions. Then, you write the code. If you still have problems

RE: modifying xml entry

2002-12-09 Thread Admin-Stress
Well, of course I dont ask the complete working code ... English is not my mother language, so maybe my writing was wrong, but I dont mean that I asked the complete working code. Hmm ... I dont understand about 'hash' variable type in perl, could you give me any 'example' ? thanks --- "Beau E.

RE: modifying xml entry

2002-12-09 Thread Beau E. Cox
Hi - I understand... The hash data type is a collection of key/value pairs. Hash variables are denoted by thr '%' symbol. For example, my %somehash; declares an empty hash variable named 'somehash'; To populate a hash, assign values to keys. If the key doesn't exist the key is created and ass

Re: Super Newbie Q

2002-12-09 Thread John W. Krahn
Alan moote wrote: > > Hey gang, > > As you will soon see, I am quite new to Perl. I am > trying to out put a list of IPs that are trying to > access cmd.exe on my webserver. The problem is, when > I run the script against my access_log the output is a > bunch of blank lines. Here's the script

Re: Please help Simple Perl programm

2002-12-09 Thread Sheriff Gaye
From:"Alfa rOMEO" <[EMAIL PROTECTED]>To:[EMAIL PROTECTED]:Please help Simple Perl programmDate:Fri, 06 Dec 2002 21:32:22 +Mime-Version:1.0Content-Type:text/plain; format=flowedMessage-ID:<[EMAIL PROTECTED]> Plain Text Attachment [ Save to my Yahoo! Briefcase | Download File ] >>Hi,>>>I

Re: perl embed problem

2002-12-09 Thread Ramprasad A Padmanabhan
Sorry for bothering you all I did some google research myself and found the answer I had to do export W=`perl -MExtUtils::Embed -e ccopts -e ldopts ` gcc $W embed.c and it compiles file Ramprasad A Padmanabhan wrote: hello all I think i am missing out something very small but not able to

Net::FTP How to find the rate of transfer

2002-12-09 Thread sharan
Hello, How to get the total time took to transfer a file? i.e transfer rate. I am using Net::FTP to do ftp. I could not find any method, which let me get the transfer rate. Can anyone help me in this regard? Thanks Sharan Hiremath. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For a

transforming strings to an array of characters

2002-12-09 Thread Erik Browaldh
hi everyone! if I have a string, lets say $word="perl"; I want to copy this so I have something like this: @word_list["p","e","r","l"] also, how do I get the length of @word_list? thanks in advance! Erik -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: transforming strings to an array of characters

2002-12-09 Thread Stefan Lidman
@word_list = split //, $word; $nrOfLetters = @word_list; Erik Browaldh wrote: > > hi everyone! > > if I have a string, lets say > $word="perl"; > > I want to copy this so I have something like this: > @word_list["p","e","r","l"] > > also, how do I get the length of @word_list? > > thanks in

Re: transforming strings to an array of characters

2002-12-09 Thread Tanton Gibbs
I know this has already been answered, but usually you can do things more efficiently on the string itself...what are you trying to do? Tanton - Original Message - From: "Erik Browaldh" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 09, 2002 7:24 AM Subject: transformin

RE: SetReadMode doc

2002-12-09 Thread Rob Das
This is the code from subroutine ReadMode: sub ReadMode { my($mode) = $modes{$_[0]}; my($fh) = normalizehandle((@_>1?$_[1]:\*STDIN)); if(defined($mode)) { SetReadMode($mode,$fh) } elsif( $_[0] =~ /^\d/) { SetReadMode($_[0],$fh) }

RE: func to see if an item exists in an array?

2002-12-09 Thread wiggins
Good advice. Until that time you may want to check out: perldoc -f grep http://danconia.org On Sun, 8 Dec 2002 22:30:49 -0600 , "Wagner, David --- Senior Programmer Analyst --- WGO"<[EMAIL PROTECTED]> wrote: > If you have acces ge

RE: Standard time and calendar functions for Perl?

2002-12-09 Thread wiggins
You may also want to see Date::Calc on CPAN. http://danconia.org On Sun, 8 Dec 2002 21:19:22 -1000, "Beau E. Cox" <[EMAIL PROTECTED]> wrote: > Hi - > > Look at Date::Manip on CPAN: > > http://search.cpan.org/author/SBECK/DateManip-5.40/Manip.pod

cookies, cant reach it from $ENV{'HTTP_COOKIE'}

2002-12-09 Thread Erik Browaldh
Hello again! going from one cgi-scripts to another and I cant get the cookie? I write some of the code here. cgi-script 1: .. ... use CGI qw(:standard); $name1=param('name'); # get the name from a fill out form $cookie1=cookie(-name=>$name1 ); print "Content-Type:text/html\n\n"; then I op

RE: SetReadMode doc (guru needed, unresolved)

2002-12-09 Thread wiggins
This is where things get a little fuzzy for me :-)...sorry about that. If my understanding is correct, I believe it is an autoloaded method, in other words it is not directly defined anywhere in the module, it is automagically defined by Perl. It also appears to be autoloaded from a c function,

Re: Using ssh for uptime?

2002-12-09 Thread Mark Goland
Well whats not working ?? Mark - Original Message - From: "Mark-Nathaniel Weisman" <[EMAIL PROTECTED]> To: "Mark Goland" <[EMAIL PROTECTED]> Cc: "perl" <[EMAIL PROTECTED]> Sent: Monday, December 09, 2002 3:14 AM Subject: RE: Using ssh for uptime? > Mark, > I've got the code you sent i

Re: Net::FTP How to find the rate of transfer

2002-12-09 Thread Dr. Poo
hehe, write one... and let me know when you're done! hehe Actually... if you understand OOP code, that's not a bad idea at all.help out the community! (yea i would, but i'm very busy :-) Good luck! -Chris On Monday 09 December 2002 06:19 am, sharan wrote: > Hel

Merging some stuff..

2002-12-09 Thread hapan
Hello people Do any one of you know a good way to merge some expressions into one? this is what i would like in one thing: $killer $score{ $killer } its for some logparsing. This generates the output i want ex: monkey -15 elephant 10 monkey -17 elephant 12 i need this to so i can use a f

Re: transforming strings to an array of characters

2002-12-09 Thread Mystik Gotan
If not using length() direcly on @world_list: @word_list = qw(bla bla bla bla bla joah hey); foreach $element (@word_list) { local($content); my(@lengths); $content = length($element); push(@lengths, $element); # or different order, I always forgot this :) } -- Bob Erinkveld (Webma

Re: Using ssh for uptime?

2002-12-09 Thread zentara
On Sun, 8 Dec 2002 23:14:36 -0900, [EMAIL PROTECTED] (Mark-Nathaniel Weisman) wrote: >Mark, > I've got the code you sent installed and working (or almost working >anyway) snippet below: >I'm trying to get this silly thing working, so any ideas or suggestions >are more than appreciated. Hi, I use

Creating a file with permissions _rw_______

2002-12-09 Thread Dylan Boudreau
I have my output going to a file I am creating at the time and want to have the file permissions as just _rw___ Is there a way to set the umask of the file when it is being opened? Thanks, Dylan

Re: transforming strings to an array of characters

2002-12-09 Thread Paul Johnson
Mystik Gotan said: > If not using length() direcly on @world_list: > > @word_list = qw(bla bla bla bla bla joah hey); Your following code is an expensive noop ... > foreach $element (@word_list) { > local($content); Whoops. Why are you using local? Use my unless you _know_ that you need local

RE: Creating a file with permissions _rw_______

2002-12-09 Thread Bob Showalter
> -Original Message- > From: Dylan Boudreau [mailto:[EMAIL PROTECTED]] > Sent: Monday, December 09, 2002 12:09 PM > To: [EMAIL PROTECTED] > Subject: Creating a file with permissions _rw___ > > > I have my output going to a file I am creating at the time and want to > have the file per

Perl operators question

2002-12-09 Thread Geoffrey F. Green
Here's a real beginners question: What do the assignment operators "||=" and "&&="do? I understand "+=" and "-=" and the like;, but I can't figure out what these two do. Perldoc perlop isn't much help, saying only that they "work as in C", and my copy of "The C Programming Language" -- don't ask

Re: How does the Perl Module called "NET:ftp" logon to an FTP server?

2002-12-09 Thread Jason Kendall
Thanks for the input... I will do some research on this "ncftpget"only thing is...I hope that the ncftpget can do ftp "puts" as well ( I would assume that it can) ! -Thanks again. - Original Message - From: "Ramprasad A Padmanabhan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: M

RE: Perl operators question

2002-12-09 Thread wiggins
||= sets the variable on the left to the value on the right if it is not already |defined. &&= I would *guess* sets the value on the variable on the left to the value on the right if it is defined, but not if it is not defined, so I guess for when you want to replace something but not define it

RE: Perl operators question

2002-12-09 Thread Bob Showalter
> -Original Message- > From: Geoffrey F. Green [mailto:[EMAIL PROTECTED]] > Sent: Monday, December 09, 2002 12:48 PM > To: [EMAIL PROTECTED] > Subject: Perl operators question > > > Here's a real beginners question: > > What do the assignment operators "||=" and "&&="do? I > understand

perl module for linux server IP address configuration

2002-12-09 Thread Admin-Stress
Hi, Just wondering is there any perl module for configuring linux server IP address? Thanks, __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addi

Re: Super Newbie Q

2002-12-09 Thread Alan Moote
Thanks, I have taken all of your comments into account and updated my script. However, it still functions the same. Perhaps there should be an "if" statement inthere somewhere stating "if I find a line that has cmd.exe in it, capture the IP address to $1 and print it out"??? Al -- Wiggins d'An

Re: Perl operators question

2002-12-09 Thread Jenda Krynicky
From: "Geoffrey F. Green" <[EMAIL PROTECTED]> > Here's a real beginners question: > > What do the assignment operators "||=" and "&&="do? I understand "+=" > and "-=" and the like;, but I can't figure out what these two do. > > Perldoc perlop isn't much help, saying only that they "work as in C

Re: crypt()

2002-12-09 Thread Jerry M . Howell II
I'd like to thank everyone on and off list for thier help even the ones that chewed me out for even thinking of writeing a perl mod that executes as root. I don't plan on this type of code going on a prodution server for some time but finaly got it working like it should. One bump down, many to com

Re: linked list's

2002-12-09 Thread Jason Tiller
Hi, Mark, :) On Sun, 8 Dec 2002, Mark Goland wrote: > I am having problems printing this doubly list. the bug statment > prints the expacted so I think I have the list setup right, but I > cant get this list to print in reverse... any ideas ?? > #!/usr/bin/perl -w # Always do this. use strict;

output help

2002-12-09 Thread Raghupathy, Ramesh .
Hi, I am using perl 5.8.0 for windows to output Unicode characters in a file and I like to see the unicode characters using any word processor on Windows. When I use Word 2000 using Arial Unicode MS font, all the unicode characters looks garbled. How can I see the Unicode characters of the file

Re: How does the Perl Module called "NET:ftp" logon to an FTP server?

2002-12-09 Thread simran
Hi Jason, To me it sounds like your firewall has limited ftp to work only via active or passive modes. My guess is that you used to use ftp in active mode but now your firewall only allows ftp in passive mode. Most ftp programs support passive mode, so hopefully you will be able to get it worki

Strange "print" syntax

2002-12-09 Thread Rajendra Babu, Praveen
Hi All !!! The below code works fine: $FH = $file_IDS[$z]; print $FH "$splt_line[$loctn[$i]],"; print $FH "$splt_line[$loctn[$i+1]]\n"; $z++; But when I remove the temporary variable $FH and use the $file_IDS[$z] directly in the print statement, gives a syntax er

Re: Strange "print" syntax

2002-12-09 Thread Wiggins d'Anconia
From perldoc -f print "Note that if you’re storing FILEHANDLES in an array or other expression, you will have to use a block returning its value instead": print { $files[$i] } "stuff\n"; print { $OK ? STDOUT : STDERR } "stuff\n"; http://danconia.org Rajendra Babu, Praveen wrote: Hi All

Re: linked list's

2002-12-09 Thread Mark Goland
Ok I got it working now, thanx much Jason. Only question I have is regarding this. >$head ||= $link; What is this line doing ?? Mark - Original Message - From: "Jason Tiller" <[EMAIL PROTECTED]> To: "perl" <[EMAIL PROTECTED]> Sent: Monday, December 09, 2002 3:16 PM Subject: Re: linke

Re: linked list's

2002-12-09 Thread simran
That line just says... * If $head is true, then leave it alone, else set it to the value of $link (aka: $head ||= $link _is the same as_ $head = $head || $link) simran. On Tue, 2002-12-10 at 13:34, Mark Goland wrote: > Ok I got it working now, thanx much Jason. Only question I have is regar

Package Syntax

2002-12-09 Thread Jeff Westman
I usually see the last line in a package as 1; Does this force the package to compile without error? What does it do, and why don't all packages have it? Thanks JW __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http

Re: How does the Perl Module called "NET:ftp" logon to an FTP server?

2002-12-09 Thread Ramprasad A Padmanabhan
for put use ncftpput On Tue, 2002-12-10 at 02:42, Jason Kendall wrote: > Thanks for the input... > > I will do some research on this "ncftpget"only thing is...I hope that > the ncftpget can do ftp "puts" as well ( I would > assume that it can) ! > > -Thanks again. > > - Original Message

Re: Package Syntax

2002-12-09 Thread Ramprasad A Padmanabhan
internally perl interpreter reads any file and runs an eval() on the content and if eval status returns true then the file is *compiled*. Since normal scripts have a number of statements which we use in the void context but which return true so we never have to do an return true in normal s

Re: weird problems (dunno a good subject)

2002-12-09 Thread Ramprasad A Padmanabhan
why bother , play america's army a little later; let kde finish ;-) anyway you should be catching signals ( like ctrl-c ) in your script and reset all environment variables and try giving a way so that the next time you car run the script and it picks up from where it had left Christopher J