Problem with ssh and STDIN

2004-09-14 Thread Ohad Ohad
I encounter a weird problem. When I try to execute : system( ssh -x server_name command) It seems to close my STDIN Any idea why that happens and how can I solve it? _ Tired of spam? Get advanced junk mail protection with MSN 8.

Catching signals

2004-08-17 Thread Ohad Ohad
Hi, can you please show me an example of the following signal catching scenario: 1. First Ctrl-C = Just warn and wait for a key-stroke, if any key other then Ctrl-C is presses, continue with the program. 2. If Ctrl-C was pressed again = Try to die gracefully, meaning do some cleanup before

Perl df modules advice

2004-07-30 Thread Ohad Ohad
Hey, I found 3 modules that are used for df on cpan Filesys::DiskFree Filesys::DiskSpace Filesys::Df I need to run it on various systems (mainly Linux, Sun, HP) Anyone had any experiance with those? Which is the most reliable and easy to use? Thanks

Perl - Expect

2004-07-15 Thread Ohad Ohad
Hi, I need to telnet some hosts automatically without supplying password. I can do it with Expect but I hardly know the language. I wonder what you think of the Perl module Expect - if it's any good and easy to use. Also if you can think of another way to do the job this will also be great.

Re: Perl - Expect

2004-07-15 Thread Ohad Ohad
ssh is not an option - I must use telnet From: [EMAIL PROTECTED] To: Ohad Ohad [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: Perl - Expect Date: Thu, 15 Jul 2004 07:41:20 -0400 Hi, I need to telnet some hosts automatically without supplying password. I can do it with Expect but I hardly

OT - Perl editing with colors

2004-07-01 Thread Ohad Ohad
Say I edit perl script with nedit or gvim and color highlight the syntax. Is there anyway I can print the file WITH the colors? I guess it means saving the colored file to some other format I just have no idea how to do it. Thanks _

terminal manipulation in Perl

2004-03-18 Thread Ohad Ohad
Hey, How do I send the cursor to the begining of current line? I want to output a circular string and I want the string to start over on the same line. Thanks _ Tired of spam? Get advanced junk mail protection with MSN 8.

Re: terminal manipulation in Perl

2004-03-18 Thread Ohad Ohad
UNIX, mainly SunOS From: Michael C. Davis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: terminal manipulation in Perl Date: Thu, 18 Mar 2004 06:30:29 -0600 At 11:55 AM 3/18/04 +, Ohad Ohad wrote: How do I send the cursor to the begining of current line? On which operating system/s

Re: terminal manipulation in Perl

2004-03-18 Thread Ohad Ohad
Thanks a lot! That worked great. Ohad From: James Edward Gray II [EMAIL PROTECTED] To: Ohad Ohad [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: terminal manipulation in Perl Date: Thu, 18 Mar 2004 08:18:53 -0600 On Mar 18, 2004, at 5:55 AM, Ohad Ohad wrote: Hey, How do I send

Re: chown-ing symlink

2004-03-16 Thread Ohad Ohad
'He' wants to do it because it needs to be done. When a user of the system owns a link he enjoys seeing he's username next to it when ls-ing, else he complains (a lot !!!) then 'His' boss complains and 'he' needs to explain that Perl can't do it, then the boss gets mad cause' he not know what

chown-ing symlink

2004-03-12 Thread Ohad Ohad
chown seems to be able only to follow links and change the destination. Anyway to change the link itself, I wouldn't want to run system(chown -h $file) . . . I'm using various unix machine (Linux, SunOs etc.) _ Tired of spam? Get

RE: listing prime numbers in a range (Beginning Perl exercise)

2004-02-25 Thread Ohad Ohad
I'm not sure why (assuming it will work) you think it will give you prime numbers . . . You could try this: perl -e 'print@{[grep{(1x$_)!~/^(11+?)\1+$/}2..shift||1e2]}\n' number This will print all primes between 2 and number Probably not what you wanted, and the explanation of why it works is

RE: $self

2004-02-19 Thread Ohad Ohad
No, but it's a cool convention From: Jacob Chapa [EMAIL PROTECTED] To: Perl Beginners [EMAIL PROTECTED] Subject: $self Date: Thu, 19 Feb 2004 22:23:14 -0600 is $self a special scalar? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: map?

2004-01-31 Thread Ohad Ohad
perldoc map perldoc grep They both have very semilar functionality of creating a new array from existing one. From: Mallik [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Perl Beginners [EMAIL PROTECTED] Subject: map? Date: Sat, 31 Jan 2004 17:38:22 +0530 I couldn't understand the

opening files on remote computers

2003-12-10 Thread Ohad Ohad
Hi, What's the best way to open (for reading) a file on remote computer (in perl) ? Thanks. _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus -- To unsubscribe, e-mail: [EMAIL

Re: opening files on remote computers

2003-12-10 Thread Ohad Ohad
Well, I just want to open the file for reading. somthing like open(FILE, host:file) will be great. Even better if it uses ssh. From: Andrew Gaffney [EMAIL PROTECTED] To: Ohad Ohad [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: opening files on remote computers Date: Wed, 10 Dec 2003 07:43

Re: opening files on remote computers

2003-12-10 Thread Ohad Ohad
: Andrew Gaffney [EMAIL PROTECTED] To: Ohad Ohad [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: opening files on remote computers Date: Wed, 10 Dec 2003 08:22:18 -0600 Ohad Ohad wrote: Well, I just want to open the file for reading. somthing like open(FILE, host:file) will be great. Even better

Re: STDIN

2003-09-15 Thread Ohad Ohad
From: Vema Venkata [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: STDIN Date: Mon, 15 Sep 2003 16:16:51 +1000 In my script iam using the following line.. where the user has to keyin either of the options 1)Change_Request, 2)call_req 3)Both options

Perl History

2003-07-31 Thread Ohad Ohad
hey All, I need some pointers (essays, presentations whatever . . .) on Perl past/present/future . I'm looking for something as little technical as possible. 10x _ Add photos to your e-mail with MSN 8. Get 2 months FREE*.

Re: Comparing timestamp of 2 files

2003-06-12 Thread Ohad Ohad
Check out http://www.perldoc.com/perl5.8.0/pod/func/-X.html You'll probably want to use the -M op. Ohad. From: Amit Sharma [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Comparing timestamp of 2 files Date: Thu, 12 Jun 2003 12:04:48 +0530 Hi All, I need your help to compare the file

Unix diff in perl

2003-06-05 Thread Ohad Ohad
hey, Is there a perl function/module that will help me calculate the difference between two files? Something like the diff Unix command. 10x Ohad. _ Protect your PC - get McAfee.com VirusScan Online

Learning Perl

2003-04-01 Thread Ohad Ohad
hey, I guess this question came up several time already so a link will be fine. What is the best way to learn Perl for someone with very basic programming skills. 10x Ohad. _ Protect your PC - get McAfee.com VirusScan Online

Re: Urgent: How do I find real file instead of link

2003-03-19 Thread Ohad Ohad
Thought it was obvious, but I guess not . . . What I want is : I have a symbolic link (to file - Unix), and I want to get the real file it is pointing to. 10x From: Ohad Ohad [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Urgent: How do I find real file instead of link Date: Wed, 19 Mar

How does FALSE acts when passed to sub?

2002-10-25 Thread Ohad Ohad
lets say: $_ = Hello; With the following subs calls: 1. sub(m/H/); 2. sub(m/R/); 3. sub(m/H/, 1); 4. sub(m/R/, 1); Now when I check @_ inside sub I get. 1. ('1'); 2. ();#Empty 3. ('1', 1); 4. (1)#??? Wierd doesn't sub knows it's getting two parameters (due to the comma)? Can anyone shed