comp.lang.perl.misc
  Home FAQ Contact Sign in
comp.lang.perl.misc only
 
Advanced search
April 2008
motuwethfrsasuw
 123456 14
78910111213 15
14151617181920 16
21222324252627 17
282930     18
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.perl.misc Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  Shortcut for if(defined($var) && $var ne "") ?         


Author: vikimun
Date: Apr 5, 2008 23:53

Is there shorter equivalent of if(defined($var) && $var ne "")
that doesn't fall for the "0" case, and doesn't produce warning with -
w ?

Thanks
V.M.
5 Comments
  About perl closure.         


Author: pswd
Date: Apr 5, 2008 20:59

I have little idea about what are closures for perl?
Is it just a function maker that returns a reference of subroutine?

Could anybody tell me what it is and show me some examples?

Thanks in advance!
2 Comments
  FAQ 8.40 How do I avoid zombies on a Unix system?         


Author: PerlFAQ Server
Date: Apr 5, 2008 18:03

This is an excerpt from the latest version perlfaq8.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

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

8.40: How do I avoid zombies on a Unix system?

Use the reaper code from "Signals" in perlipc to call wait() when a
SIGCHLD is received, or else use the double-fork technique described in
"How do I start a process in the background?" in perlfaq8.

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

The perlfaq-workers, a group of volunteers, maintain the perlfaq. They
are not necessarily experts in every domain where Perl might show up,
so please include as much information as possible and relevant in any
corrections. The perlfaq-workers also don't have access to every
operating system or platform, so please include relevant details for
corrections to examples that do not work on particular platforms.
Working code is greatly appreciated.
Show full article (1.23Kb)
no comments
  Newbie wants a simple script in perl         


Author: 2007
Date: Apr 5, 2008 12:41

Hi

I have a file called "list1" - its got about 80 rows - each row is
alpha numeric name w/ ".txt" extension - each name refers to a file in
the dir.

The script reads the list - for each name in the list, it will perform
an operation (an executable of a "C-program" and writes to same name
with a different extension, say ".mp3".

Thanks
13 Comments
  FAQ 8.30 How can I convert my shell script to perl?         


Author: PerlFAQ Server
Date: Apr 5, 2008 12:03

This is an excerpt from the latest version perlfaq8.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

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

8.30: How can I convert my shell script to perl?

Learn Perl and rewrite it. Seriously, there's no simple converter.
Things that are awkward to do in the shell are easy to do in Perl, and
this very awkwardness is what would make a shell->perl converter nigh-on
impossible to write. By rewriting it, you'll think about what you're
really trying to do, and hopefully will escape the shell's pipeline
datastream paradigm, which while convenient for some matters, causes
many inefficiencies.

--------------------------------------------------------------------
Show full article (1.49Kb)
no comments
  FAQ 8.18 How can I do an atexit() or setjmp()/longjmp()? (Exception handling)         


Author: PerlFAQ Server
Date: Apr 5, 2008 06:03

This is an excerpt from the latest version perlfaq8.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

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

8.18: How can I do an atexit() or setjmp()/longjmp()? (Exception handling)

Release 5 of Perl added the END block, which can be used to simulate
atexit(). Each package's END block is called when the program or thread
ends (see perlmod manpage for more details).

For example, you can use this to make sure your filter program managed
to finish its output without filling up the disk:

END {
close(STDOUT) || die "stdout close failed: $!";
}

The END block isn't called when untrapped signals kill the program,
though, so if you use END blocks you should also use

use sigtrap qw(die normal-signals);
Show full article (2.21Kb)
no comments
  Π‘ΠΏΠΎΡ€Ρ‚ΠΈΠ²Π½Ρ‹Π΅ Ρ‚ΠΎΠ²Π°Ρ€Ρ‹ Shop Body         


Author: ΓΊΓΓŒΓΓ”ΓΓŠ ëÌÏÎ
Date: Apr 5, 2008 01:49

Shop Body - ΠΈΠ½Ρ‚Π΅Ρ€Π½Π΅Ρ‚-ΠΌΠ°Π³Π°Π·ΠΈΠ½ Ρ‚ΠΎΠ²Π°Ρ€ΠΎΠ² для красоты ΠΈ Π·Π΄ΠΎΡ€ΠΎΠ²ΡŒΡ. ΠœΡ‹ Ρ€Π°Π΄Ρ‹
ΠΏΡ€Π΅Π΄Π»ΠΎΠΆΠΈΡ‚ΡŒ Π’Π°ΡˆΠ΅ΠΌΡƒ вниманию Ρ‚ΠΎΠ²Π°Ρ€Ρ‹ для Π·Π΄ΠΎΡ€ΠΎΠ²ΡŒΡ самыС качСствСнныС ΠΈ
эффСктивныС Ρ‚ΠΎΠ²Π°Ρ€Ρ‹ Π²Π΅Π΄ΡƒΡ‰ΠΈΡ… ΠΏΡ€ΠΎΠΈΠ·Π²ΠΎΠ΄ΠΈΡ‚Π΅Π»Π΅ΠΉ ΠΌΠΈΡ€Π°: пояса, Π±Π°Π½Π΄Π°ΠΆΠΈ,
корсСты, ΠΊΠΎΡ€Ρ€Π΅ΠΊΡ‚ΠΎΡ€Ρ‹ осанки, издСлия для похудСния ΠΈ лСчСния Ρ†Π΅Π»Π»ΡŽΠ»ΠΈΡ‚Π°,
массаТСры ΠΈ миостимуляторы, Π°ΠΏΠΏΠ°Ρ€Π°Ρ‚Ρ‹ Ρ„ΠΈΠ·ΠΈΠΎΡ‚Π΅Ρ€Π°ΠΏΠΈΠΈ ΠΈ ΠΌΠ΅Π΄Ρ‚Π΅Ρ…Π½ΠΈΠΊΡƒ, Π½Π°Π±ΠΎΡ€Ρ‹
для ΡƒΡ…ΠΎΠ΄Π° Π·Π° Ρ€ΡƒΠΊΠ°ΠΌΠΈ, Π° Ρ‚Π°ΠΊΠΆΠ΅: Ρ‚Π΅Ρ€ΠΌΠΎΠ±Π΅Π»ΡŒΠ΅ ΠΈ Π³Ρ€Π΅Π»ΠΊΠΈ, фиксаторы суставов,
космСтику для ΡƒΡ…ΠΎΠ΄ Π·Π° Π»ΠΈΡ†ΠΎΠΌ ΠΈ волосами, принадлСТности ΠΈ Ρ‚Π΅Ρ…Π½ΠΈΠΊΠ° для
Π΄ΠΎΠΌ ΠΈ Π΄Π°Ρ‡ΠΈ, Ρ‚Π΅Ρ…Π½ΠΈΠΊΠ° ΠΈ приспособлСния для ΠΊΡƒΡ…Π½ΠΈ, домашниС Ρ‚Ρ€Π΅Π½Π°ΠΆΠ΅Ρ€Ρ‹ ΠΈ
спортивныС Ρ‚ΠΎΠ²Π°Ρ€Ρ‹, ортопСдичСскиС ΠΏΠΎΠ΄ΡƒΡˆΠΊΠΈ ΠΈ матрасы ΠΈ ΠΌΠ½ΠΎΠ³ΠΎΠ΅ Π΄Ρ€ΡƒΠ³ΠΎΠ΅.

Π‘ΠΏΠΎΡ€Ρ‚ΠΈΠ²Π½Ρ‹Π΅ Ρ‚ΠΎΠ²Π°Ρ€Ρ‹ http://shopbody.ru/
no comments
  FAQ 8.22 Why do setuid perl scripts complain about kernel problems?         


Author: PerlFAQ Server
Date: Apr 5, 2008 00:03

This is an excerpt from the latest version perlfaq8.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

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

8.22: Why do setuid perl scripts complain about kernel problems?

Some operating systems have bugs in the kernel that make setuid scripts
inherently insecure. Perl gives you a number of options (described in
perlsec) to work around such systems.

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

The perlfaq-workers, a group of volunteers, maintain the perlfaq. They
are not necessarily experts in every domain where Perl might show up,
so please include as much information as possible and relevant in any
corrections. The perlfaq-workers also don't have access to every
operating system or platform, so please include relevant details for
corrections to examples that do not work on particular platforms.
Working code is greatly appreciated.
Show full article (1.23Kb)
no comments