XS help

2008-07-25 Thread Rajnikant
Hello All, I'm trying to call C routine from Perl using XS but some how my 'make test' is failing. Following are the steps I did : file: hypotenuse.h double hypotenuse(double x, double y); /* Func Declaration */ file: hypotenuse.c /* Func Definition */ double hypotenuse(double

RE: Signal Handlers

2008-07-11 Thread Rajnikant
until ($sig) { print "running...\n"; sleep 1; } _ From: Rajnikant [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2008 6:37 PM To: 'Perl Beginners' Subject: FW: Signal Handlers Can someone confirm whether you people getting my mails or not? If

FW: Signal Handlers

2008-07-09 Thread Rajnikant
Can someone confirm whether you people getting my mails or not? If yes, please commment on following code _ From: Rajnikant [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 08, 2008 6:49 PM To: 'Perl Beginners' Subject: FW: Signal Handlers Hello all, I want to catch SIGS

FW: Signal Handlers

2008-07-08 Thread Rajnikant
{ print "running...\n"; sleep 1; } _ From: Rajnikant [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 08, 2008 1:15 PM To: 'Perl Beginners' Subject: Signal Handlers Hello Gurus, I'm using following code snipet to catch SIGSEV signal. local $SIG{SEGV} = \&seg_ha

Signal Handlers

2008-07-08 Thread Rajnikant
Hello Gurus, I'm using following code snipet to catch SIGSEV signal. local $SIG{SEGV} = \&seg_handler; sub seg_handler { my $sig = shift; print "seg_handler :: Caught $sig \n"; } while (1) { print ("Still alive \n"); sleep 1; } When I send SEGV signal to this process (kill

RE: Getting file type in perl

2008-07-07 Thread Rajnikant
Thanks Thomas. I tried same with File::Type :). -Original Message- From: Thomas Bätzler [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2008 4:25 PM To: Perl Beginners Cc: Rajnikant Subject: RE: Getting file type in perl Rajnikant <[EMAIL PROTECTED]> asked: > Unix command f

Getting file type in perl

2008-07-07 Thread Rajnikant
Hello everyone, Unix command file gives file type of that file. # file a.txt.gz a.txt.gz: gzip compressed data, was "a.txt", from Unix How can I achieve same in perl? Thanks, Rajnikant DISCLAIMER == This e-mail may contain privileged and confidential information wh

RE: removing '*' from *****STAFF*****

2008-07-03 Thread Rajnikant
Try out this, my $stuff = '*STAFF*'; $stuff =~ s/\*//g; Print $stuff; Regards, Rajnikant Jachak -Original Message- From: John W. Krahn [mailto:[EMAIL PROTECTED] Sent: Thursday, July 03, 2008 10:38 AM To: Perl Beginners Subject: Re: removing '*' from ***

RE: about Zlib

2008-07-02 Thread Rajnikant
Thanks for replying Jeff. But can we use Zlib for same? Rajnikant Jachak | Software Engg | Persistent Systems Limited [EMAIL PROTECTED] | Cell: +91 9822204088 | Tel: +91 (20) 3023 2479 Persistent Systems - Innovations in software product design,development and delivery

RE: user id validation

2008-07-01 Thread Rajnikant
Hey Richard, I think $< returns user id. Correct me if I'm wrong ;-). Rajnikant Jachak | Software Engg | Persistent Systems Limited [EMAIL PROTECTED] | Cell: +91 9822204088 | Tel: +91 (20) 3023 2479 Persistent Systems - Innovations in software product design,development and

RE: user id validation

2008-07-01 Thread Rajnikant
Is there any such way to get home directory of user? Rajnikant Jachak | Software Engg | Persistent Systems Limited [EMAIL PROTECTED] | Cell: +91 9822204088 | Tel: +91 (20) 3023 2479 Persistent Systems - Innovations in software product design,development and delivery - www.persistentsys.com

RE: user id validation

2008-07-01 Thread Rajnikant
Thanks Amit. Yours is the valid doubt. The $ENV { USER } approach is not secure. I'll go with Merlyn >> my $user = getpwuid $<; >> if ($user eq "merlyn") { ... } # it's me! Rajnikant Jachak | Software Engg | Persistent Systems Limited [EMAIL PROTECTED] |

RE: user id validation

2008-07-01 Thread Rajnikant
I think Work around for this is, My $usr = $ENV { USER }; If ($usr eq "userA") Go get it Else Access restricted. Rajnikant Jachak | Software Engg | Persistent Systems Limited [EMAIL PROTECTED] | Cell: +91 9822204088 | Tel: +91 (20) 3023 2479 Persistent Systems - Inno

about Zlib

2008-07-01 Thread Rajnikant
I want to uncompress *.gz and *.tar on linux box. So is there any package which will do it for me? Can we use Zlib to do same? Thanks in advance. Rajnikant Jachak | Software Engg | Persistent Systems Limited <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] | Cell: +91 9822204088 | Tel: +

about perl module uninstallation

2008-06-20 Thread Rajnikant
Hello All, I had installed perl modules like Net::SFTP, Math::BigInt etc. I need to uninstall it. How can I uninstall these modules from my perl? Thanks in advance. Rajnikant Jachak | Software Engg | Persistent Systems Limited <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] | Cel

RE: Argument for perl script

2008-06-19 Thread Rajnikant
t;--name") { print (" Name is $argv[$icnt+1] \n"); $icnt++; } } } else { print ("USAGE: script_name --name \n"); } ~ ~~~~ Thanks and Best regards, ~ Rajnikant Software Engg. Persistent Sys. Ltd. Ph. +91 98222 04088 -O

Starting perl script @ boot up

2008-06-12 Thread Rajnikant
ompt but system is not able to start same processes while botting up. Do any one have pointers? If this question is not relevant to this mailing list, Please direct me to proper mailing list. Rajnikant Jachak | Software Engg | Persistent Systems Limited <mailto:[EMAIL PROTECTED]> [EMAIL P

about init.d and perl

2008-06-10 Thread Rajnikant
temp=killproc "perl -w parent_proc" } I'm using "perl -w parent_proc" to kill the process as I'm getting this as process name after "ps -af" execution. Am I doing this correctly? If I killed parent process will it kill its sibilings also thro' killproc? Th

RE: how to manipulate word using perl

2008-06-09 Thread Rajnikant
Try this: perl -pli -e 's/.txt/=/' input_file Search for 'How to replace some string in file' topic in same mailing list for more info. Thanks and Best regards, ~ Rajnikant Software Engg. Persistent Sys. Ltd. Ph. +91 98222 04088 -Original Mess

RE: about readdir call

2008-06-05 Thread Rajnikant
Thanks Thomas... :) It helped. Thanks and Best regards, ~ Rajnikant Software Engg. Persistent Sys. Ltd. Ph. +91 98222 04088 -Original Message- From: Thomas Bätzler [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2008 5:50 PM To: beginners@perl.org Cc: Rajnikant

about readdir call

2008-06-05 Thread Rajnikant
s got disturbed. Do anyone know reason why I'm getting such output? What are the modifications if I want output same to that of 'ls -l'? Thanks in advance. Thanks and Best regards, ~ Rajnikant Software Engg. Persistent Sys. Ltd. Ph. +91 98222 04088

Getting Segmentation fault

2008-05-31 Thread Rajnikant
pt_name run : perl -w Script_name Do you have any guess why am I getting Segmentation fault? Is this the right way to pass parameters and particularly memory allocation and deallocation? Thanks in advance. Thanks and Best regards, ~ Rajnikant Software Engg. Persiste

About Win32::Job package

2008-05-30 Thread Rajnikant
help. Thanks and Best regards, ~ Rajnikant Software Engg. Persistent Sys. Ltd. Ph. +91 98222 04088 DISCLAIMER == This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of

Inline C

2008-05-29 Thread Rajnikant
'. Do you have any guess why its happening? If required tell me, I'll post source code for same. Thanks. Thanks and Best regards, ~ Rajnikant Software Engg. Persistent Sys. Ltd. Ph. +91 98222 04088 DISCLAIMER == This e-mail may contain privileged a

RE: difference between FTP and SFTP

2008-05-29 Thread Rajnikant
Thanks Chas. You got it correct. I do want the client using SFTP to download files from server. Thanks again for ur help as I have completed that assignment :). Thanks and Best regards, ~ Rajnikant Software Engg. Persistent Sys. Ltd. Ph. +91 98222 04088 -Original

difference between FTP and SFTP

2008-05-28 Thread Rajnikant
Hi everyone, I have question about SFTP's connection modes. FTP can use Active or Passive mode for same. Is SFTP also supports such modes? Thanks. Thanks and Best regards, ~ Rajnikant Software Engg. Persistent Sys. Ltd. Ph. +91 98222 04088 DISCL

RE: about SFTP and Thread dependency

2008-05-28 Thread Rajnikant
lly Cause these think works if I don't use thread? Thanks and Best regards, ~ Rajnikant Software Engg. Persistent Sys. Ltd. Ph. +91 98222 04088 -Original Message- From: Chas. Owens [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 28, 2008 7:09 PM To: Rajnikant Sub

RE: about SFTP and Thread dependency

2008-05-28 Thread Rajnikant
{ print("=== not returned anything\n"); } } } } $thread->join(); Do anyone have any guess? Thanks for replies. Thanks and Best regards, ~ Rajnikant Software Engg. Persistent Sys. Ltd. Ph. +91 98222 04088 -O

about SFTP and Thread dependency

2008-05-28 Thread Rajnikant
s code runs fine without segmentation fault. 2. If we uncomment 'use Net::SFTP', it gives segmentation fault :(. Can anyone experienced such situation? Is there any dependency in these modules or I'm doing it wrong? Thanks in advance. Thanks and Best reg

Getting Segmentation fault

2008-05-27 Thread Rajnikant
*** unknown type 41. at /usr/lib/perl5/site_perl/5.8.8/Net/SSH/Perl/Util/SSH2MP.pm line 17. Segmentation fault Could someone please help me out finding whats wrong in code? Thanks in advance. Thanks and Best regards, ~ Rajnikant Software Engg. Persistent Sys. Ltd. P