comp.lang.perl.misc
  Home FAQ Contact Sign in
comp.lang.perl.misc only
 
Advanced search
November 2007
motuwethfrsasuw
   1234 44
567891011 45
12131415161718 46
19202122232425 47
2627282930   48
2007
 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
  File::Find make me mad         


Author: Alitaia
Date: Dec 2, 2007 19:10

I write a simple perl, del.pl, to use File::Find to find *.ape and
delete them. I can find the *.ape but can not del outside the
directory, can del them within the directory, I dont know what's
wrong.

for example:
If directory structure like this:
---./layer1
|
/layer2
|
a.ape
b.ape

with the following code, within layer2
#del.pl ./ a.ape and b.ape can be deleted

but if under ./layer1,
#del.pl ./layer2 a.ape, b.ape can be found but can not del

what is wrong?
Show full article (0.96Kb)
6 Comments
  Increment in nested loop         


Author: Tony Lissner
Date: Dec 2, 2007 08:30

This is a shortened version.
Anyone have any ideas how to get the
inner loop to increment.

Source file unknown number of lines.
Read the file and print two lines per
page until EOF

This is what I want.
Page N
Headers
Two lines on each page

Page 1
Headers
25,Fred,Nerk
23,Foo,Bar

Page 2
Headers
05,perl,v5.8.8
blank line

This is what I get.
Show full article (0.81Kb)
6 Comments
  FAQ 4.45 How do I find the first array element for which a condition is true?         


Author: PerlFAQ Server
Date: Dec 2, 2007 06:03

This is an excerpt from the latest version perlfaq4.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 .

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

4.45: How do I find the first array element for which a condition is true?

To find the first array element which satisfies a condition, you can use
the "first()" function in the "List::Util" module, which comes with Perl
5.8. This example finds the first element that contains "Perl".

use List::Util qw(first);

my $element = first { /Perl/ } @array;

If you cannot use "List::Util", you can make your own loop to do the
same thing. Once you find the element, you stop the loop with last.

my $found;
foreach ( @array ) {
if( /Perl/ ) { $found = $_; last }
}
Show full article (2.14Kb)
no comments
  FAQ 3.31 What's MakeMaker?         


Author: PerlFAQ Server
Date: Dec 2, 2007 00:03

This is an excerpt from the latest version perlfaq3.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 .

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

3.31: What's MakeMaker?

(contributed by brian d foy)

The "ExtUtils::MakeMaker" module, better known simply as "MakeMaker",
turns a Perl script, typically called "Makefile.PL", into a Makefile.
The unix tool "make" uses this file to manage dependencies and actions
to process and install a Perl distribution.

--------------------------------------------------------------------
Show full article (1.30Kb)
no comments
  Computer Security Information and What You Can Do To Keep Your System Safe!         


Author: Anaya.Stratton.group.com
Date: Dec 1, 2007 21:43

.:: Unix and Linux Hacking and Security ::.
1. Unix - Vulnerabilities and Advisories
-- Tutorials and Papers
-- Specific Exploits and Vulnerabilities

2. Unix - Security Tools
-- Unix Security and Audit Tools (Including IDS and Access Control
Tools)
-- Unix Log Analysis Tools
-- Unix Proxies, Firewalls and Accessories
-- Unix Miscellany

3. Unix - BSD, FreeBSD, etc...
-- FreeBSD
-- BSD and Misc. BSD variants
-- BSD Security Tools
-- BSD Micro-distributions
Show full article (6.74Kb)
no comments
  Re: Sorted Hash <a1ddaad2-89c6-4b01-bd39-2e27e36ffe39@b40g2000prf.googlegroups.com> <Xns99F7CDC51277Fasu1cornelledu@127.0.0.1>         


Author: A. Sinan Unur
Date: Dec 1, 2007 21:22

"Peter J. Holzer" wrote in
news:slrnfl3khq.k4i.hjp-usenet2@zeno.hjp.at:
> On 2007-11-30 01:13, A. Sinan Unur <1usa@llenroc.ude.invalid> wrote:
>> "palexvs@gmail.com" gmail.com> wrote in
>> news:a1ddaad2-89c6-4b01-
>> bd39-2e27e36ffe39@b40g2000prf.googlegroups.com...
Show full article (2.64Kb)
no comments
  FAQ 4.18 Does Perl have a Year 2000 problem? Is Perl Y2K compliant?         


Author: PerlFAQ Server
Date: Dec 1, 2007 18:03

This is an excerpt from the latest version perlfaq4.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 .

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

4.18: Does Perl have a Year 2000 problem? Is Perl Y2K compliant?

Short answer: No, Perl does not have a Year 2000 problem. Yes, Perl is
Y2K compliant (whatever that means). The programmers you've hired to use
it, however, probably are not.

Long answer: The question belies a true understanding of the issue. Perl
is just as Y2K compliant as your pencil--no more, and no less. Can you
use your pencil to write a non-Y2K-compliant memo? Of course you can. Is
that the pencil's fault? Of course it isn't.
Show full article (2.56Kb)
no comments
  FAQ 4.73 How do I print out or copy a recursive data structure?         


Author: PerlFAQ Server
Date: Dec 1, 2007 12:03

This is an excerpt from the latest version perlfaq4.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 .

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

4.73: How do I print out or copy a recursive data structure?

The "Data::Dumper" module on CPAN (or the 5.005 release of Perl) is
great for printing out data structures. The "Storable" module on CPAN
(or the 5.8 release of Perl), provides a function called "dclone" that
recursively copies its argument.

use Storable qw(dclone);
$r2 = dclone($r1);

Where $r1 can be a reference to any kind of data structure you'd like.
It will be deeply copied. Because "dclone" takes and returns references,
you'd have to add extra punctuation if you had a hash of arrays that you
wanted to copy.

%%newhash = %%{ dclone(\%%oldhash) };

--------------------------------------------------------------------
Show full article (1.66Kb)
no comments
  ActiveState Perl 5.10 under Windows XP         


Author: dilbert1999
Date: Dec 1, 2007 09:16

Hi all,

I have used Perl 5.8.8 for some time now, but I hope you don't mind if
I post my first ever perl 5.10 program and ask for comments: (I just
discovered that ActiveState have now released a Beta for Perl 5.10
under Windows XP)

C:\>perl -v

This is perl, v5.10.0 built for MSWin32-x86-multi-thread
(with 2 registered patches, see perl -V for more detail)

Copyright 1987-2007, Larry Wall

Binary build 1000 [283192] Beta provided by ActiveState http://www.ActiveState.com
Built Nov 22 2007 14:37:48

Here is my program :

use strict;
use warnings;
use feature ':5.10';

property($_) for (0, 1, 2, 3, 4, 'aad', 'abd', 'acd', 'add', 99, 100,
101, 3.1415);
Show full article (1.07Kb)
4 Comments
  Re: OT raibow         


Author: A. Sinan Unur
Date: Dec 1, 2007 08:20

"Petr Vileta" wrote in
news:fipin5$vsd$1@ns.felk.cvut.cz:
> My question is not perl specific but here are many clever people :-)

You don't see me asking for restaurant recommendations here, do you?

Sinan

--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
clpmisc guidelines: <URL:http://www.augustmail.com/~tadmc/clpmisc.shtml>
5 Comments
1 2 3 4 5 6 7 8 9