[27408] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 9067 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Mar 19 21:05:44 2006

Date: Sun, 19 Mar 2006 18:05:03 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 19 Mar 2006     Volume: 10 Number: 9067

Today's topics:
    Re: Finding unused variables in a Perl script <corff@zedat.fu-berlin.de>
    Re: Finding unused variables in a Perl script <matthew.garrish@sympatico.ca>
    Re: perl ssh with timeout? (Rick Scott)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 19 Mar 2006 19:44:20 GMT
From: <corff@zedat.fu-berlin.de>
Subject: Re: Finding unused variables in a Perl script
Message-Id: <485qkkFih245U1@uni-berlin.de>

Andreas Krause <spotturn@gmx.de> wrote:
: I'm looking for a module or program to find all declared but unused variables
: in a Perl script.

Ever tried perl -w?

Oliver.

-- 
Dr. Oliver Corff              e-mail:    corff@zedat.fu-berlin.de


------------------------------

Date: Sun, 19 Mar 2006 15:04:29 -0500
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: Finding unused variables in a Perl script
Message-Id: <fPiTf.1716$ji6.51664@news20.bellglobal.com>


<corff@zedat.fu-berlin.de> wrote in message 
news:485qkkFih245U1@uni-berlin.de...
> Andreas Krause <spotturn@gmx.de> wrote:
> : I'm looking for a module or program to find all declared but unused 
> variables
> : in a Perl script.
>
> Ever tried perl -w?
>

Yuck, are you secretly advocating making all your variables global?

use warnings;
$x;
my $y;

---

Useless use of a variable in void context at e:\scripts\undec.pl line 2.
Name "main::x" used only once: possible typo at e:\scripts\undec.pl line 2.


Matt 




------------------------------

Date: Sun, 19 Mar 2006 23:18:42 -0000
From: rick@shadowspar.dyndns.org (Rick Scott)
Subject: Re: perl ssh with timeout?
Message-Id: <1142808357.751c55b8.725@shadowspar>

(Markus Dehmann <markus.dehmann@gmail.com> uttered:)
> How can I use perl to connect to a remote computer via ssh with a
> timeout?

Use alarm to send yourself a SIGALRM in $timeout seconds, then install
a function that handles SIGALRM.

This is a frequently asked question.  You can use
    perldoc -q keyword 
to search the Perl FAQ for the given keyword; in this case,
    perldoc -q timeout 
would have given you the answer you are looking for.  See also:

    perldoc -f alarm
    perldoc perlipc




Cheers,
Rick
-- 
key CF8F8A75 / print C5C1 F87D 5056 D2C0 D5CE  D58F 970F 04D1 CF8F 8A75 
O Lord, help my words to be gracious and tender today --
tomorrow, I may have to eat them.
     :Pierre Trudeau


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 9067
***************************************


home help back first fref pref prev next nref lref last post