Reading Files across directories and subdirectories

2008-12-02 Thread Koti
Hi Matt, A very Good Morning, Need a small Info for my problem. I have a directory named "X" which has many sub directories "Y","Z","W" and many files about 20 , and these sub directories also contain some more sub directories and files in them and those sub directories also contain more directori

Special Var with Name of current scope or name of subroutine?

2008-12-02 Thread Deviloper
Hi! Is there a special variable or trick to get the name of the current scope or subroutine name? Thanks, B.

Re: Special Var with Name of current scope or name of subroutine?

2008-12-02 Thread Chas. Owens
On Tue, Dec 2, 2008 at 09:11, Deviloper <[EMAIL PROTECTED]> wrote: > Hi! > > Is there a special variable or trick to get the name of the current scope or > subroutine name? > > Thanks, > B. > The caller* function will tell you information about the call stack (including the current function): #!

Re: Special Var with Name of current scope or name of subroutine?

2008-12-02 Thread Chas. Owens
On Tue, Dec 2, 2008 at 09:23, Chas. Owens <[EMAIL PROTECTED]> wrote: > On Tue, Dec 2, 2008 at 09:11, Deviloper <[EMAIL PROTECTED]> wrote: >> Hi! >> >> Is there a special variable or trick to get the name of the current scope or >> subroutine name? >> >> Thanks, >> B. >> > > The caller* function wi

Re: Reading Files across directories and subdirectories

2008-12-02 Thread Chas. Owens
On Tue, Dec 2, 2008 at 06:48, Koti <[EMAIL PROTECTED]> wrote: > Hi Matt, A very Good Morning, Need a small Info for my problem. > > I have a directory named "X" which has many sub directories > "Y","Z","W" and many files about 20 , and these sub directories also > contain some more sub directories

Re: Reading Files across directories and subdirectories

2008-12-02 Thread James Moser
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Dec 2, 2008, at 5:48 AM, Koti wrote: Hi Matt, A very Good Morning, Need a small Info for my problem. I have a directory named "X" which has many sub directories "Y","Z","W" and many files about 20 , and these sub directories also contain some m

Re: help with subroutines and reading/writing to file

2008-12-02 Thread Jim Hill
blake in <[EMAIL PROTECTED]>: > I am new to perl and attempting to write a script that will do a reverse dns > lookup on an ip [snip] Just looking that far, I don't think your script will work as you intend. Here's a ptr lookup using dig ... | dig -x 217.151.101.100 | 100.101.151.217.in-addr.ar

Starting with ::

2008-12-02 Thread Martin Barth
Hello, whats the difference if you start a variable with :: for example: $::a $a $main::a or: Package Foo; $::a # <- this is still main?! $::Foo::a $Foo::a $a didn't found information in the perldoc. Regards Martin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-

Re: Special Var with Name of current scope or name of subroutine?

2008-12-02 Thread Jenda Krynicky
From: "Chas. Owens" <[EMAIL PROTECTED]> > On Tue, Dec 2, 2008 at 09:23, Chas. Owens <[EMAIL PROTECTED]> wrote: > > On Tue, Dec 2, 2008 at 09:11, Deviloper <[EMAIL PROTECTED]> wrote: > >> Hi! > >> > >> Is there a special variable or trick to get the name of the current scope > >> or subroutine name

Re: Starting with ::

2008-12-02 Thread Mr. Shawn H. Corey
On Tue, 2008-12-02 at 16:42 +0100, Martin Barth wrote: > Hello, > > whats the difference if you start a variable with :: > > for example: > > $::a > $a > $main::a > > or: > > Package Foo; > $::a # <- this is still main?! Yes, the is a shortcut for $main::a > > $::Foo::a This is a shortcut

Re: Starting with ::

2008-12-02 Thread Martin Barth
> > $::Foo::a > > This is a shortcut for $main::Foo::a % perl -e 'package Foo; $a = 2; print $::Foo::a' 2% % perl -e 'package Foo; $a = 2; print $Foo::a' 2% 2 so every package is a "subpackage" of main? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

version 5.10.0

2008-12-02 Thread Patrick Dupre
Hello, I am experiencing 2 problems with the new version: 1) I have a .pl file which needs libraries located in the same directory (.pm), so I used to put: use lib '/home/pdupre/dir_name' ; inside my .pl file. That way, I was able to run the application from another directory by using a link. Now

Re: Starting with ::

2008-12-02 Thread Mr. Shawn H. Corey
On Tue, 2008-12-02 at 17:44 +0100, Martin Barth wrote: > > > $::Foo::a > > > > This is a shortcut for $main::Foo::a > > % perl -e 'package Foo; $a = 2; print $::Foo::a' > 2% > % perl -e 'package Foo; $a = 2; print $Foo::a' 2% > 2 > > so every package is a "subpackage" of main? Apparently

Re: Reading Files across directories and subdirectories

2008-12-02 Thread John W. Krahn
James Moser wrote: On Dec 2, 2008, at 5:48 AM, Koti wrote: I have a directory named "X" which has many sub directories "Y","Z","W" and many files about 20 , and these sub directories also contain some more sub directories and files in them and those sub directories also contain more directorie

Re: Reading Files across directories and subdirectories

2008-12-02 Thread James Moser
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Dec 2, 2008, at 11:51 AM, John W. Krahn wrote: James Moser wrote: On Dec 2, 2008, at 5:48 AM, Koti wrote: I have a directory named "X" which has many sub directories "Y","Z","W" and many files about 20 , and these sub directories also contain

Re: "df -mg" system() -> $variable

2008-12-02 Thread Jay Savage
On Mon, Dec 1, 2008 at 10:18 PM, David <[EMAIL PROTECTED]> wrote: > Thank you to all who helped me get a 6 digit date into perl. I certainly > heed warnings about not using outside system calls in perl however, I have > to make an outside call again. > > > > #!/usr/bin/perl -w > use strict; > > my

Re: "df -mg" system() -> $variable; solution

2008-12-02 Thread David
Thanks to all the input. I learned... what more I have to learn. Here is the final working perl script that sends the current "df -mg" command to a text file for daily logging. -David #!/usr/bin/perl -w use strict; use warnings; my $dayStamp = do { my ( $day, $month, $year ) = ( localt

Re: Reading Files across directories and subdirectories

2008-12-02 Thread Ganesh Babu N
Koti, You can use File::List module which does your task very easily. Regards, Ganesh On Tue, Dec 2, 2008 at 5:18 PM, Koti <[EMAIL PROTECTED]> wrote: > Hi Matt, A very Good Morning, Need a small Info for my problem. > > I have a directory named "X" which has many sub directories > "Y","Z","W" a

SSH to diff. machine

2008-12-02 Thread Irfan.Sayed
Hi All, I need to write perl script which will SSH to different machine , run some commands and then send out the mail with the output of that command. Can it be possible in perl. Please let me know some sample code. Please help/suggest. Regards Irf This e-mail and any files transm

Re:SSH to diff. machine

2008-12-02 Thread Jeff Pang
> Message du 03/12/08 08:37 > De : [EMAIL PROTECTED] > A : beginners@perl.org > Copie à : > Objet : SSH to diff. machine > > > Hi All, > > > > I need to write perl script which will SSH to different machine , run > some commands and then send out the mail with the output of that > command. > > > >