[30729] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1974 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 10 09:09:47 2008

Date: Mon, 10 Nov 2008 06:09:12 -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           Mon, 10 Nov 2008     Volume: 11 Number: 1974

Today's topics:
    Re: [OT]: maximum memory <someone@example.com>
    Re: Help: How can I parse this properties file? <bik.mido@tiscalinet.it>
        HTML::Entities & UTF8 <howachen@gmail.com>
        Huge files manipulation <klashxx@gmail.com>
    Re: Huge files manipulation <RedGrittyBrick@spamweary.invalid>
    Re: Huge files manipulation <tadmc@seesig.invalid>
    Re: Huge files manipulation <RedGrittyBrick@spamweary.invalid>
    Re: interfacing with Perl script <bwalton@nospam.invalid>
    Re: interfacing with Perl script <jurgenex@hotmail.com>
    Re: interfacing with Perl script <cartercc@gmail.com>
        lil amber pre teen model - Free megiacomonadeau@gmail.com
        model pre teen underwear - Free megiacomonadeau@gmail.com
        new CPAN modules on Mon Nov 10 2008 (Randal Schwartz)
    Re: Split a multi-sequence file into individual files xhoster@gmail.com
        The end of dynamic scope <xueweizhong@gmail.com>
    Re: The end of dynamic scope <xueweizhong@gmail.com>
    Re: The London Fetish Week Survival Guide for North Ame superfanhfut@gmail.com
        tiny angels bbs - Free megiacomonadeau@gmail.com
        Will this be a potential memory leak? <u8526505@gmail.com>
        young underage models - Free megiacomonadeau@gmail.com
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sun, 09 Nov 2008 22:18:18 -0800
From: "John W. Krahn" <someone@example.com>
Subject: Re: [OT]: maximum memory
Message-Id: <JmQRk.408$e54.337@newsfe21.iad>

Ilya Zakharevich wrote:
> [A complimentary Cc of this posting was sent to
> <sln@netherlands.com>], who wrote in article <1i6eh4d6cc5co31mahlqtkdehruqalrvl5@4ax.com>:
>>> 	is a very anxious bigbrother: a "good" video camera (I'm
>>> 	thinking about IMAX-like quality, 4K x 3K x 3 x 50p; maybe not
>>> 	available this year, but RSN) can easily saturate 10Gb-BASE
>>> 	connection (in RAW stream with minimal compression).
> 
>> I think this falls under the category of navel research
> 
> Hmm, all navel researches I saw were done in (super?) 35mm;

Maybe you are thinking of Super 8 (8mm)?

> never in (15-sprocket) IMAX format.

AFAIK IMAX is in 70mm, but I don't know how many sprockets the projector 
has, or if that matters.  (Although a video camera wouldn't have 
sprockets [unless you're thinking of Sprockets on SNL but that only 
appeared 14 times.])


John
-- 
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall


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

Date: Mon, 10 Nov 2008 00:44:54 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Help: How can I parse this properties file?
Message-Id: <bvseh4tnp8spe3l2dfgq1o8d6h77mif20a@4ax.com>

On Fri, 07 Nov 2008 08:39:09 -0600, Ted Zlatanov <tzz@lifelogs.com>
wrote:

>TJM> $line =~ s/\\\\/&backslash;/g;  # translate literal backslashes
[cut]
>TJM> __DATA__
>TJM> a=b=c
>TJM> a\=b=c
>TJM> a\\=b=c
>TJM> a\\\=b=c
>TJM> ----------------------------
>>> 
>>> I was thinking of a similar solution, but adding 256 (or some other
>>> large number) to each escaped character (in case there's a '&backslash;'
>>> in the data).  As long as it's valid Unicode and the original data
>>> doesn't contain Unicode characters it should be a clean translation.
>
>MD> I like to be sure thus instead of adding "some other large number" I
>MD> actually *find* something that *can't* be there:
>
>MD>   my $delim = "&". (sort @delims = $line =~ /&(\0+);/)[-1] . "\0;";
>MD>   $line =~ s/\\\\/$delim;/g;  # translate literal backslashes
>MD>   # ...
>
>Surely there's a CPAN module to do this...  Or 10...
>
>From the docs of Encode::Escape, there's also String::Escape,
>Unicode::Escape, TeX::Encode, HTML::Mason::Escape,
>Template::Plugin::XML::Escape, URI::Escape.

There could be even more: each of them would make maximum sense in the
context it would be actually designed for, non of which seems to be
the case for the OP's requirement. That TJM chose (reasonably!) a
"markup" resemblink that appropriate for one of those *::Escape
thingies is a whole another matter. More precisely, it could get
ridiculously improbable, but if those modules don't "find something
that's surely NOT there" then one could actually concoct up an example
data file that would make them fail on it. And I was illustrating the
general concept and technique of "finding something that's surely NOT
there" which I (i) still support now (ii) FOR ONCE don't necessarily
advocate the use of an existing module for, given that it can be
expressed in an excessively big number of ways with a simple statement
too. (Here I chose sort() because the overhead is minimum, but it may
well have been reduction, and so on...)


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Mon, 10 Nov 2008 03:31:40 -0800 (PST)
From: howa <howachen@gmail.com>
Subject: HTML::Entities & UTF8
Message-Id: <50c55011-4e6b-4648-ad13-2c8d3b132666@b31g2000prb.googlegroups.com>

Hello, consider my CGI program:

#=======================
use HTML::Entities;
use utf8;

print STDERR encode_entities( $q->param("q") ), "\n";

#=======================

The incoming page was set to UTF8 and the parameter is Chinese UTF8
characters, but the output of the above codes give me:


&auml;&cedil;&shy;&aring;&#156;&#139;&auml;&ordm;&ordm;277


I have already used utf8 and don't know what else I missed.

Any idea?


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

Date: Mon, 10 Nov 2008 02:24:53 -0800 (PST)
From: klashxx <klashxx@gmail.com>
Subject: Huge files manipulation
Message-Id: <92f8be17-d299-44e6-853e-9c0676749201@35g2000pry.googlegroups.com>

Hi , i need a fast way to delete duplicates entrys from very huge
files ( >2 Gbs ) , these files are in plain text.

 ..To clarify, this is the structure of the file:

30xx|000009925000194653|00000000000000|20081031|02510|00000005445363|
01|F|0207|00|||+0005655,00|||+0000000000000,00
30xx|000009925000194653|00000000000000|20081031|02510|00000005445363|
01|F|0207|00|||+0000000000000,00|||+0000000000000,00
30xx|4150010003502043|CARDS|20081031|MP415001|00000024265698|01|F|
1804|
00|||+0000000000000,00|||+0000000000000,00

Having a key formed by the first 7 fields i want to print or delete
only the duplicates( the delimiter is the pipe..).

I tried all the usual methods ( awk / sort /uniq / sed /grep .. ) but
it always ended with the same result (out of memory!)

In using HP-UX large servers.

I 'm very new to perl, but i read somewhere tha Tie::File module can
handle very large files , i tried but cannot get the right code...

Any advice will be very well come.

Thank you in advance.

Regards

PD:I do not want to split the files.


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

Date: Mon, 10 Nov 2008 11:13:34 +0000
From: RedGrittyBrick <RedGrittyBrick@spamweary.invalid>
Subject: Re: Huge files manipulation
Message-Id: <49181760$0$24451$fa0fcedb@news.zen.co.uk>


klashxx wrote:
> Hi , i need a fast way to delete duplicates entrys from very huge
> files ( >2 Gbs ) , these files are in plain text.
> 
> ..To clarify, this is the structure of the file:
> 
> 30xx|000009925000194653|00000000000000|20081031|02510|00000005445363|
> 01|F|0207|00|||+0005655,00|||+0000000000000,00
> 30xx|000009925000194653|00000000000000|20081031|02510|00000005445363|
> 01|F|0207|00|||+0000000000000,00|||+0000000000000,00
> 30xx|4150010003502043|CARDS|20081031|MP415001|00000024265698|01|F|
> 1804|
> 00|||+0000000000000,00|||+0000000000000,00
> 
> Having a key formed by the first 7 fields i want to print or delete
> only the duplicates( the delimiter is the pipe..).
> 
> I tried all the usual methods ( awk / sort /uniq / sed /grep .. ) but
> it always ended with the same result (out of memory!)
> 
> In using HP-UX large servers.
> 
> I 'm very new to perl, but i read somewhere tha Tie::File module can
> handle very large files , i tried but cannot get the right code...
> 
> Any advice will be very well come.
> 
> Thank you in advance.
> 
> Regards
> 
> PD:I do not want to split the files.

When you try the following do you run out of memory?

perl -n -e '/^(\w*|\w*|\w*|\w*|\w*|\w*|\w*)|/ \
             and print unless $seen{$1}++' \
             hugefilename

You might trade CPU for RAM by making a hash of the key. (in the 
cryptographic digest sense not the perl associative array sense).

Tie:File works with files larger than memory but I'm not sure how you 
would use it for your problem. It's storing the index of seen keys that 
is the problem.

I'd maybe tie my %seen to a dbm file. See `perldoc -f tie`

-- 
RGB


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

Date: Mon, 10 Nov 2008 06:13:07 -0600
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: Huge files manipulation
Message-Id: <slrnghg9aj.h7k.tadmc@tadmc30.sbcglobal.net>

RedGrittyBrick <RedGrittyBrick@spamweary.invalid> wrote:

> perl -n -e '/^(\w*|\w*|\w*|\w*|\w*|\w*|\w*)|/ \


ITYM:

    perl -n -e '/^(\w*\|\w*\|\w*\|\w*\|\w*\|\w*\|\w*)\|/ \


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


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

Date: Mon, 10 Nov 2008 13:10:11 +0000
From: RedGrittyBrick <RedGrittyBrick@spamweary.invalid>
Subject: Re: Huge files manipulation
Message-Id: <491832b5$0$2516$da0feed9@news.zen.co.uk>


Tad J McClellan wrote:
> RedGrittyBrick <RedGrittyBrick@spamweary.invalid> wrote:
> 
>> perl -n -e '/^(\w*|\w*|\w*|\w*|\w*|\w*|\w*)|/ \
> 
> 
> ITYM:
> 
>     perl -n -e '/^(\w*\|\w*\|\w*\|\w*\|\w*\|\w*\|\w*)\|/ \
> 
> 

Doh!

-- 
RGB


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

Date: Sun, 09 Nov 2008 20:11:59 -0500
From: Bob Walton <bwalton@nospam.invalid>
Subject: Re: interfacing with Perl script
Message-Id: <49178a60$0$13736$9a6e19ea@unlimited.newshosting.com>

ela wrote:
> As I have written a perl script so no need to reinvent the wheel but can 
> anybody suggest me how to interface?
> 
> #!/bin/sh
 ...
> #
> based on the generated file & takes the statistics on it
> $numarray="perl $ref.output";
> 
> done
> 
> #
> print the statistics into a file
> print OUTFP $numarray;

Well, if I understand you correctly (which may be doubtful, as you 
appear to me to have a mix of shell script and Perl above), you want to 
run a Perl program from a shell script and have the Perl program's 
standard output end up in a file.  This is typically accomplished with 
something like:

perl_program_file_name <input_file_name >output_file_name

HTH.

 ...

-- 
Bob Walton
Email: http://bwalton.com/cgi-bin/emailbob.pl


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

Date: Sun, 09 Nov 2008 17:39:20 -0800
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: interfacing with Perl script
Message-Id: <c24fh41te987rupn8q4rhhre1636n5q9mn@4ax.com>

"ela" <ela@yantai.org> wrote:
>As I have written a perl script so no need to reinvent the wheel but can 
>anybody suggest me how to interface?
[snipped confusing description]

I have no idea what you are actually trying to do here, but Perl
provides all the usual inter-process communication methods that you
would expect from any other programming language.
Therefore whatever interface your other process has, chances are very
high that your Perl program can hook into that interface.

jue


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

Date: Sun, 9 Nov 2008 19:27:49 -0800 (PST)
From: cartercc <cartercc@gmail.com>
Subject: Re: interfacing with Perl script
Message-Id: <f01ca391-0861-4518-a981-2ec9f80ea5e3@p35g2000prm.googlegroups.com>

On Nov 9, 5:18=A0am, "ela" <e...@yantai.org> wrote:
> As I have written a perl script so no need to reinvent the wheel but can
> anybody suggest me how to interface?

Ordinarily, you can do this in three steps:
1. read in the file,
2. transform the data, and
3. write out the file.

If you write out the file in a character delimited format, you can
open it in Excel and create any type of chart that you want. However,
from the appearance of your data, it seems that you are already there.

Here is a general template that you can use:

open INFILE, "<my_in_file" or die "$!";
open OUTFINE, ">my_out_file" or die "$!";
while (<INFILE>)
{
  chomp;
  @line =3D split /splitchar/;
  printf OUTFILE "%c, %s, %d, %.2f%%\n",
    $line[0], $line[1], $line[2]+14, $line[3]/2*100;
}
close OUTFILE;
close INFILE;

CC


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

Date: Mon, 10 Nov 2008 00:57:36 -0800 (PST)
From: megiacomonadeau@gmail.com
Subject: lil amber pre teen model - Free
Message-Id: <95d06f52-3741-437b-a6b1-8fa75676cbe8@e38g2000prn.googlegroups.com>

lil amber pre teen model
 .
 .
 .
*******CLICK HERE********
http://vids247.cn/lil-amber-pre-teen-model
*****************************
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
lil amber pre teen model


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

Date: Mon, 10 Nov 2008 00:58:01 -0800 (PST)
From: megiacomonadeau@gmail.com
Subject: model pre teen underwear - Free
Message-Id: <2093a754-6492-4bcc-9dca-6aeaa07c75e7@t18g2000prt.googlegroups.com>

model pre teen underwear
 .
 .
 .
*******CLICK HERE********
http://vids247.cn/model-pre-teen-underwear
*****************************
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
model pre teen underwear


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

Date: Mon, 10 Nov 2008 05:42:23 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Mon Nov 10 2008
Message-Id: <KA3run.Axt@zorch.sf-bay.org>

The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN).  You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.

B-Hooks-OP-Check-StashChange-0.04
http://search.cpan.org/~flora/B-Hooks-OP-Check-StashChange-0.04/
Invoke callbacks when the stash code
----
Bot-BasicBot-Pluggable-Module-GoodBad-0.02
http://search.cpan.org/~kitano/Bot-BasicBot-Pluggable-Module-GoodBad-0.02/
Tracks Good/Bad for people
----
Bot-BasicBot-Pluggable-Module-LivedoorWeather-0.01
http://search.cpan.org/~kitano/Bot-BasicBot-Pluggable-Module-LivedoorWeather-0.01/
Get weather
----
Bot-BasicBot-Pluggable-WithConfig-0.02
http://search.cpan.org/~kitano/Bot-BasicBot-Pluggable-WithConfig-0.02/
initialize bot instance with YAML
----
Deliantra-Client-0.9978
http://search.cpan.org/~mlehmann/Deliantra-Client-0.9978/
----
Devel-PackagePath-0.01
http://search.cpan.org/~perigrin/Devel-PackagePath-0.01/
Inspect and Manipulate a Path based on a Package
----
Device-USB-0.27
http://search.cpan.org/~gwadej/Device-USB-0.27/
Use libusb to access USB devices.
----
DustyDB-0.04
http://search.cpan.org/~hanenkamp/DustyDB-0.04/
yet another Moose-based object database
----
DustyDB-0.05
http://search.cpan.org/~hanenkamp/DustyDB-0.05/
yet another Moose-based object database
----
File-CountLines-0.0.1
http://search.cpan.org/~moritz/File-CountLines-0.0.1/
efficiently count the number of line breaks in a
----
File-Path-2.07
http://search.cpan.org/~dland/File-Path-2.07/
Create or remove directory trees
----
JFIF-0.12
http://search.cpan.org/~krzak/JFIF-0.12/
JFIF/JPEG tags operations.
----
Kwiki-Archive-Cvs-0.104
http://search.cpan.org/~josephw/Kwiki-Archive-Cvs-0.104/
Kwiki Page Archival Using CVS
----
Mojo-Server-FCGI-0.01
http://search.cpan.org/~sri/Mojo-Server-FCGI-0.01/
Speedy FastCGI Server
----
MojoX-Dispatcher-FilterChain-0.02
http://search.cpan.org/~vti/MojoX-Dispatcher-FilterChain-0.02/
Intercepting filter manager
----
MooseX-Iterator-0.09
http://search.cpan.org/~rlb/MooseX-Iterator-0.09/
Iterate over collections
----
Muldis-D-0.50.0
http://search.cpan.org/~duncand/Muldis-D-0.50.0/
Formal spec of Muldis D relational DBMS lang
----
Muldis-Rosetta-0.13.0
http://search.cpan.org/~duncand/Muldis-Rosetta-0.13.0/
Full-featured truly relational DBMS in Perl
----
Net-DNSBL-Monitor-0.07
http://search.cpan.org/~miker/Net-DNSBL-Monitor-0.07/
Monitor DNSBL response
----
Net-DNSBL-MultiDaemon-0.25
http://search.cpan.org/~miker/Net-DNSBL-MultiDaemon-0.25/
multi DNSBL prioritization
----
Net-DNSBL-Statistics-0.09
http://search.cpan.org/~miker/Net-DNSBL-Statistics-0.09/
gather DNSBL Statistics
----
Net-Gadu-1.9
http://search.cpan.org/~krzak/Net-Gadu-1.9/
Interfejs do biblioteki libgadu.so dla protoko?u
----
Ogg-Vorbis-Header-PurePerl-1.0
http://search.cpan.org/~daniel/Ogg-Vorbis-Header-PurePerl-1.0/
An object-oriented interface to Ogg
----
Padre-Plugin-Parrot-0.16
http://search.cpan.org/~szabgab/Padre-Plugin-Parrot-0.16/
Experimental Padre plugin that runs on Parrot
----
Rose-DBx-Object-I18N-0.03
http://search.cpan.org/~vti/Rose-DBx-Object-I18N-0.03/
set of modules to deal with multilingual
----
Sniffer-HTTP-0.18
http://search.cpan.org/~corion/Sniffer-HTTP-0.18/
multi-connection sniffer driver
----
Sub-Prototype-0.01
http://search.cpan.org/~flora/Sub-Prototype-0.01/
Set a subs prototype
----
Test-Simple-0.86
http://search.cpan.org/~mschwern/Test-Simple-0.86/
Basic utilities for writing tests.
----
WWW-MeGa-0.09_2
http://search.cpan.org/~fish/WWW-MeGa-0.09_2/
A MediaGallery
----
WWW-Wikipedia-TemplateFiller-0.02
http://search.cpan.org/~diberri/WWW-Wikipedia-TemplateFiller-0.02/
Fill Wikipedia templates with your eyes
----
WWW-Wikipedia-TemplateFiller-0.03
http://search.cpan.org/~diberri/WWW-Wikipedia-TemplateFiller-0.03/
Fill Wikipedia templates with your eyes
----
signatures-0.01
http://search.cpan.org/~flora/signatures-0.01/
subroutine signatures with no source filter


If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.

This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
  http://www.stonehenge.com/merlyn/LinuxMag/col82.html

print "Just another Perl hacker," # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion


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

Date: 10 Nov 2008 00:17:15 GMT
From: xhoster@gmail.com
Subject: Re: Split a multi-sequence file into individual files
Message-Id: <20081109191750.241$LR@newsreader.com>

Mirco Wahab <wahab-mail@gmx.de> wrote:
> Tad J McClellan wrote:
> > ela <ela@yantai.org> wrote:
> >> From google, no need to reinvent the wheel but this one line code is
> >> too difficult to understand...
> >>
> >> perl -ne 'BEGIN{ $/=">"; } if(/^\s*(\S+)/){ open(F,">$1.fsa")||warn"$1
> >> write failed:$!\n";chomp;print F ">", $_ }' fastafile
> >>
> >> anybody helps?
> >
> >
> > BEGIN{ $/=">"; }              # set the Input Record Separator
> > (perlvar.pod) while ( <> ) {                # -n wraps in a
> > while-diamond loop
> >     if( /^\s*(\S+)/ ){        # grab the first non-whitespace
> >     characters
> >         open(F,">$1.fsa") || warn"$1 write failed:$!\n"; # open a file
> >         chomp;                # remove ">" from end of string
> >         print F ">", $_;      # print ">" at beginning of string
> >     }
> > }
>
> I don't understand the purpose of the chomp,

It is to remove the trailing ">", which is not wanted.  In FASTA sequence
files, ">" is start of the next record, not the end of the current one.

> maybe it needs to be in front of the if():

I don't see how that would make a difference.  If the if fails, nothing
happens anyway.  If the if succeeds, it makes no difference if the chomp
is done before or after.

Ah, but if the file starts out with the first character of ">", (which it
probably does) then the first record contains nothing but $/.  By not
chomping the conditional is true you litter your file system with invisible
(on linux) empty files named .fsa.  If you do chomp, the conditional is
false and nothing happens, which is what one wants.  So yes, the chomp
should be before the if.


Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.


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

Date: Mon, 10 Nov 2008 04:43:05 -0800 (PST)
From: Todd <xueweizhong@gmail.com>
Subject: The end of dynamic scope
Message-Id: <672c59e6-3d18-49bc-9ab3-4a80fe0dc69c@g17g2000prg.googlegroups.com>

The dynamic scope is a slightly different defined compared with the
lexical scope when considier only the end boundary of the scope. Let
check the codes below:

  #! /bin/perl -l

  my $a1 = "old value";
  if (my $a1 = "new value") {};
  print "case `my' after <if block>: $a1";

  our $a2 = "old value";
  if (our $a2 = "new value") {};
  print "case `our' after <if block>: $a2";

  local $a3 = "old value";
  if (local $a3 = "new value") {};
  print "case `local' after <if block>: $a3";

  local our $a4 = "old value";
  if (local our $a4 = "new value") {};
  print "case `local our' after <if block>: $a4";

  __END__

  case `my' after <if block>: old value
  case `our' after <if block>: new value
  case `local' after <if block>: new value
  case `local our' after <if block>: new value

So here only the `my' variable decarlared in the condition expr of
<if block> totally disapeared after the if block.

May some one here give any hints on this?

Best regards,
Todd


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

Date: Mon, 10 Nov 2008 04:52:42 -0800 (PST)
From: Todd <xueweizhong@gmail.com>
Subject: Re: The end of dynamic scope
Message-Id: <27455eb3-8143-4e9f-8f71-88de5fbf85dc@u29g2000pro.googlegroups.com>


The `our' case can't be ignored since it's acutally a global
variable.

But the 'local' case make things a little wondering, I ofen used
product level codes like

  unless ($line =~ /...(\d+).../) {
       ErrorLogging "something wrong from input";
       return undef;
  }
  my $number = $1;
  ... # continue processing here

The point here is $1 is a local variable, according to the BOOK, the
scope is ended after the if-block, but obviously, the locally binded
$1's value is still there even after the if-block.

This is where my question comes from.

Thanks,
Todd




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

Date: Mon, 10 Nov 2008 04:06:21 -0800 (PST)
From: superfanhfut@gmail.com
Subject: Re: The London Fetish Week Survival Guide for North Americans
Message-Id: <8c8e903b-6af3-463d-b310-228a35169f23@w24g2000prd.googlegroups.com>

On 11=D4=C210=C8=D5, =CF=C2=CE=E76=CA=B113=B7=D6, fernand...@gmail.com wrot=
e:
> Magazine BDSMhttp://magazin.byethost2.comHands-down, London has some
> the best fetish party weekends around.

So what?
I really do not understand !


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

Date: Mon, 10 Nov 2008 00:55:57 -0800 (PST)
From: megiacomonadeau@gmail.com
Subject: tiny angels bbs - Free
Message-Id: <2c987224-d45b-4292-8449-8a054bf346d1@d36g2000prf.googlegroups.com>

tiny angels bbs
 .
 .
 .
*******CLICK HERE********
http://vids247.cn/tiny-angels-bbs
*****************************
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
tiny angels bbs


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

Date: Sun, 9 Nov 2008 21:05:56 -0800 (PST)
From: cyl <u8526505@gmail.com>
Subject: Will this be a potential memory leak?
Message-Id: <199d5125-1965-4dab-acd8-935a5ac9a3d1@40g2000prx.googlegroups.com>

XS(get_array_ref)
 {
    AV *av;
    int i;
    dXSARGS;

    av = newAV();
    i=10;
    while(i--){
	    SV *sv = newSViv(i);
	    av_push(av,sv);
    }
    ST(0) = sv_2mortal(newRV((SV*)av));
    XSRETURN(1);
}

If I run the code above for 100 times, for example

for (1..100){
      my $ref = get_array_ref();
}

the memory size will increase about 20K. To reduce the memory usage I
add another code to free the list

for (1..100){
      my $ref = get_array_ref();
      @$ref = ();
}

this time the memory size increased about 8K. Using "undef $ref" did
not improve. Any suggestions for this? Thanks.


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

Date: Mon, 10 Nov 2008 00:53:44 -0800 (PST)
From: megiacomonadeau@gmail.com
Subject: young underage models - Free
Message-Id: <7998f117-b804-4732-80a0-8f2b26273f85@s9g2000prm.googlegroups.com>

young underage models
 .
 .
 .
*******CLICK HERE********
http://vids247.cn/young-underage-models
*****************************
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
 .
young underage models


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

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 V11 Issue 1974
***************************************


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