[31104] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2349 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Apr 18 03:09:41 2009

Date: Sat, 18 Apr 2009 00:09:05 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 18 Apr 2009     Volume: 11 Number: 2349

Today's topics:
    Re: Capture only first match in regular expression <tadmc@seesig.invalid>
    Re: effienct way to select random value from the hash <jurgenex@hotmail.com>
    Re: I'm looking for a Perl Book... I think. <maustin@firstdbasource.com>
    Re: I'm looking for a Perl Book... I think. <nat.k@gm.ml>
    Re: I'm looking for a Perl Book... I think. <tadmc@seesig.invalid>
        Module Win32::API and DLL with Windows Visual C++ <jc_usernet@aanet.com.au>
    Re: Module Win32::API and DLL with Windows Visual C++ <ben@morrow.me.uk>
        new CPAN modules on Sat Apr 18 2009 (Randal Schwartz)
    Re: perls popularity <g3rc4n@gmail.com>
    Re: Replacing text containing parenthesis <whynot@pozharski.name>
    Re: What does `my' do?! <whynot@pozharski.name>
    Re: What does `my' do?! <tadmc@seesig.invalid>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Fri, 17 Apr 2009 19:24:18 -0500
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: Capture only first match in regular expression
Message-Id: <slrngui7di.qpg.tadmc@tadmc30.sbcglobal.net>

sln@netherlands.com <sln@netherlands.com> wrote:
> On Fri, 17 Apr 2009 09:35:32 -0500, Tad J McClellan <tadmc@seesig.invalid> wrote:
>
>>or the canonical example of where pattern matching will fail while
>>a Real Parser will not fail:
>
> You would have to be more specific why pattern match will fail and is
> not a real parser. 


Because it reported finding an anchor element where there 
was no anchor element.


> List them for me to see.


Deal with this one first.


> List any canonical example a regex can't parse.


A table nested 10 levels deep.

Then after you write a regex for that: A table nested 11 levels deep.

Then 12 levels deep.

Then 13 levels deep.

Complete the series, we'll wait...


> The modified regex below is a Real Parser then until you prove otherwise.


>>--------------------
>>#!/usr/bin/perl
>>use warnings;
>>use strict;
>>
>>my $content =<<ENDHTML;
>><!--
>>uncomment this once the legal department OKs it
>>(There is no anchor element here!)
>><a href="perl.org">Perl Homepage</a>;
>>-->
>>ENDHTML
>>
>>if($content =~ /.*?(<a .*?<\/a>).*/i){
>                        ^
> this space is a nice touch
>
>>   print "matched '$1'\n";
>>}
>>--------------------


That code produces the wrong results.


> use strict;
> use warnings;
>
> my $content =<<ENDHTML;
><!--
 ^^^^
 ^^^^
> uncomment this once the legal department OKs it
> (There is no anchor element here!)
><a href="perl.org">Perl Homepage</a>;
> -->
> ENDHTML
>
> if($content =~ /(<a .*?<\/a>)|<--.*?-->/i && defined $1){
                                ^^^
                                ^^^ still wrong results after fixing this
>    print "matched '$1'\n";
> }


That code produces the same wrong results.

Were you trying to make a point of some kind here?


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


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

Date: Thu, 16 Apr 2009 09:48:42 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: effienct way to select random value from the hash
Message-Id: <q3oeu49geb1l42j8s3c18octn8tgne9rud@4ax.com>

viki <vikimun@gmail.com> wrote:
>sub RandomElement { # select random element from the hash
>    my ($hashref) = @_;
>    my @keys = keys(%{$hashref});
>    my $random = $hashref->{ $keys[ int(rand( @keys )) ]};
>}
>
>When the hash is large, the creation of @keys for every
>invocation is invefficient. It's waste that's O((N)) for every call to
>RandomElement.

If you flatten the hash into a list then the keys will be every other
element of that list which you could easily pick by multiplying the
random number by 2 (after adjusting the range accordingly).
I don't know for sure, but treating $hashref as a reference to an array
might do the trick already.

jue


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

Date: Fri, 17 Apr 2009 20:22:40 -0500
From: Michael Austin <maustin@firstdbasource.com>
Subject: Re: I'm looking for a Perl Book... I think.
Message-Id: <TV9Gl.24179$c45.18355@nlpi065.nbdc.sbc.com>

Guy wrote:
> Ok, I'm creating my own website on genealogy.
> 
> I'd like visitors to be able to search through my site, search for names 
> etc...
> 
> I'm alright with HTML and I've got enough experience with Javascript.
> 
> But I need to do some Server-Side programming.
> 
> The only experience I have here is with Perl, but many years ago.
> 
> I'm not sure if there are better ways but I like Perl, and, well, I'm not 
> familiar with anything else.
> 
> The only book I have on Perl is: "Perl5 for Web programming" circa 1998.
> 
> This book showed me basic Perl stuff such as:
>     #!/usr/bin/perl
>     print "Content-type: text/html\n\n";
>     print "html stuff  \n";
>     $temp = $ENV{'QUERY_STRING'};
>     @pairs = split(/&/,$temp);
>     open (myfile, "names.txt");
>     foreach $items(@pairs) {
> 
> But I see stuff like this, which appears to be related to cgi.pm, and which 
> I never really learned.
>     use CGI qw/:standard/;
>     $q = new CGI;
>     @names = $q->param;
>     $value = $q->param('t01');
>     print $q->header,
>           $q->start_html('hello world'),
>           $q->end_html;
> 
> Do I need a new book on Perl, or do I need a book on CGI.pm (if such a thing 
> exists).  I'd like to understand this $q=new CGI stuff.
> 
> Can anyone suggest a book or type of book? Thanks for all,
> Guy
> 
> 

forgot to include an example pages...

http://us3.php.net/manual/en/reserved.variables.globals.php


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

Date: Fri, 17 Apr 2009 19:37:53 -0700
From: Nathan Keel <nat.k@gm.ml>
Subject: Re: I'm looking for a Perl Book... I think.
Message-Id: <52bGl.56689$e_5.32160@newsfe03.iad>

Michael Austin wrote:

> While perl is a very good CGI language, you might also consider PHP as
> it has easier and almost as powerful a command set that integrates a
> lot easier with HTML.

Curious.  What is easier about using PHP over Perl for web sites and
HTML?  I've used both for about 12 years and I don't think either are
anymore difficult than the other.  Granted, CGI needs execute
permissions and the header output, but that's really the only
difference beside a trivial amount of options to have Perl output HTML. 
Not that I oppose your recommendation, I just find it curious that
people seem to think PHP is better or easier, when the differences are
pretty easily worked with in either.


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

Date: Fri, 17 Apr 2009 20:02:23 -0500
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: I'm looking for a Perl Book... I think.
Message-Id: <slrngui9kv.qpg.tadmc@tadmc30.sbcglobal.net>

Guy <someone@somewhere.nb.ca> wrote:

> The only book I have on Perl is: "Perl5 for Web programming" circa 1998.

> But I see stuff like this, which appears to be related to cgi.pm, and which 
> I never really learned.
>     use CGI qw/:standard/;
>     $q = new CGI;


Where did you find this code?

One line is for using the CGI module in a function-oriented manner
while another line is for using the CGI module in an object-oriented
manner.

Sensible programs use only one or the other, not both at the same time.

I suggest not using wherever it was that you picked up that code.


> Do I need a new book on Perl, 


You needed a different Perl book even in 1998.

You would probably benefit from a Perl book written in the modern era.


> or do I need a book on CGI.pm (if such a thing 
> exists).  


Have you tried reading the documentation for CGI.pm that comes with CGI.pm?


> I'd like to understand this $q=new CGI stuff.


It is called "Object Oriented Programming".

You can learn a good deal about OO from Perl's std docs:

    perldoc perlboot
    perldoc perltoot
    perldoc perlobj


> Can anyone suggest a book or type of book?


Perl's std docs have such suggestions as well:

    perldoc perlbook
    perldoc -q book


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


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

Date: Fri, 17 Apr 2009 19:45:14 -0700 (PDT)
From: jc <jc_usernet@aanet.com.au>
Subject: Module Win32::API and DLL with Windows Visual C++
Message-Id: <305ef66a-4e85-4340-a4bd-bf0e267da3ed@f41g2000pra.googlegroups.com>

I am having trouble getting my own DLLs to work with the above module
(ver 0.55).
I can get the examples to work from the write up that involve the DLLs
from kernal32,
but not from my own little DLL project file.

I fear I need a simple example DLL project for MS Visual C++ 6 that
does work.
Can anyone help here?

The current fault I have is;
"Can't call method "Call" on an undefined value at Win32API_Testing.pl
line 44."

With the following lines of PERL code:
   use Win32::API;
   $function = Win32::API->new(
      'C:\\User_JC\\Perl\\Module_Win32\\DLL\\test\\Debug\\test.dll',
'int ANSIchar(int a, int b)'
   );
   $return = $function->Call( 1, 2 ) ;     # This is line 44

I have change this around but $function is always undefined.
I am not sure if Win32::API is the appropriate tool for accessing user
DLLs. ??

Regards JC....


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

Date: Sat, 18 Apr 2009 05:48:11 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Module Win32::API and DLL with Windows Visual C++
Message-Id: <bl2ob6-v82.ln1@osiris.mauzo.dyndns.org>


Quoth jc <jc_usernet@aanet.com.au>:
> I am having trouble getting my own DLLs to work with the above module
> (ver 0.55).
> I can get the examples to work from the write up that involve the DLLs
> from kernal32,
> but not from my own little DLL project file.

You haven't included the C code, so I can't see if you've done this
already, but I believe functions need to be marked __stdcall for
Win32::API to be able to call them. The default calling convention
(__cdecl) won't work.

 ...checking the documentation, this appears to no longer be true as of
version 0.48. You now *can* load __cdecl functions, but you have to
explicitly mark them as such when you import them.

> The current fault I have is;
> "Can't call method "Call" on an undefined value at Win32API_Testing.pl
> line 44."
> 
> With the following lines of PERL code:
>    use Win32::API;
>    $function = Win32::API->new(
>       'C:\\User_JC\\Perl\\Module_Win32\\DLL\\test\\Debug\\test.dll',
> 'int ANSIchar(int a, int b)'
>    );

If you had checked the return value of ->new and printed and appropriate
error message you would have a better idea why things are failing.

    my $function = Win32::API->new(...)
        or die "can't import ANSIchar from test.dll: $^E";

(Notice I added a 'my' there. You need to add 'use strict;' to the top
of your program and fix all the resulting errors.)

> I have change this around but $function is always undefined.
> I am not sure if Win32::API is the appropriate tool for accessing user
> DLLs. ??

Well, there are several alternatives. The most long-winded and most
likely to work successfully is to write a proper XS module that wraps
the DLL. If you find XS too complicated, you could use Inline::C to do
the grunt-work for you, though IME it brings its own list of
complications I prefer to do without. You could also try P5NCI, but I
don't know how well it works.

Ben



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

Date: Sat, 18 Apr 2009 04:42:26 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sat Apr 18 2009
Message-Id: <KIA52q.1vt9@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.

Acme-CPANAuthors-Chinese-0.08
http://search.cpan.org/~fayland/Acme-CPANAuthors-Chinese-0.08/
We are chinese CPAN authors 
----
Acme-CPANAuthors-Portuguese-0.02
http://search.cpan.org/~braceta/Acme-CPANAuthors-Portuguese-0.02/
We are the Portuguese CPAN Authors 
----
Acme-CSV-2.00
http://search.cpan.org/~aayars/Acme-CSV-2.00/
a module providing manipulation routines for comma separated value (CSV) records 
----
Acme-Perl-VM-0.0.1_03
http://search.cpan.org/~gfuji/Acme-Perl-VM-0.0.1_03/
An implementation of Perl5 Virtual Machine in Pure Perl (APVM) 
----
App-Rad-Plugin-ConfigLoader-0.01
http://search.cpan.org/~garu/App-Rad-Plugin-ConfigLoader-0.01/
Load config files of various types 
----
Asterisk-config-syntax-highlight-0.1
http://search.cpan.org/~nsnake/Asterisk-config-syntax-highlight-0.1/
highlight Asterisk config syntax 
----
Audio-Scan-0.07
http://search.cpan.org/~agrundma/Audio-Scan-0.07/
Fast C parser for MP3, Ogg Vorbis, FLAC, ASF 
----
CGI-IDS-1.0115
http://search.cpan.org/~hinnerk/CGI-IDS-1.0115/
PerlIDS - Perl Website Intrusion Detection System (XSS, CSRF, SQLI, LFI etc.) 
----
CPANPLUS-YACSmoke-0.33_04
http://search.cpan.org/~bingos/CPANPLUS-YACSmoke-0.33_04/
Yet Another CPANPLUS Smoke Tester 
----
Cisco-Abbrev-0.03
http://search.cpan.org/~kbrint/Cisco-Abbrev-0.03/
Translate to/from Cisco Interface Abbreviations 
----
Class-DBI-Lite-0.025
http://search.cpan.org/~johnd/Class-DBI-Lite-0.025/
Lightweight ORM for Perl 
----
DBD-SQLite-1.22_08
http://search.cpan.org/~adamk/DBD-SQLite-1.22_08/
Self-contained RDBMS in a DBI Driver 
----
DBIx-Class-InflateColumn-FS-0.01003
http://search.cpan.org/~mmims/DBIx-Class-InflateColumn-FS-0.01003/
store BLOBs in the file system 
----
Elive-0.05
http://search.cpan.org/~warringd/Elive-0.05/
Elluminate Live (c) client library 
----
Elive-0.06
http://search.cpan.org/~warringd/Elive-0.06/
Elluminate Live (c) client library 
----
Email-MIME-Encodings-1.313
http://search.cpan.org/~rjbs/Email-MIME-Encodings-1.313/
A unified interface to MIME encoding and decoding 
----
GIS-Distance-0.03
http://search.cpan.org/~bluefeet/GIS-Distance-0.03/
Calculate geographic distances. 
----
GlobalDBI-0.20
http://search.cpan.org/~aayars/GlobalDBI-0.20/
Simple DBI wrapper with support for multiple connections 
----
IO-EventMux-2.02
http://search.cpan.org/~tlbdk/IO-EventMux-2.02/
Multiplexer for sockets, pipes and any other types of filehandles that you can set O_NONBLOCK on and does buffering for the user. 
----
IPC-Exe-1.001
http://search.cpan.org/~glai/IPC-Exe-1.001/
Execute processes or Perl subroutines & string them via IPC. Think shell pipes. 
----
IPC-Exe-1.002
http://search.cpan.org/~glai/IPC-Exe-1.002/
Execute processes or Perl subroutines & string them via IPC. Think shell pipes. 
----
JSON-DWIW-0.31
http://search.cpan.org/~dowens/JSON-DWIW-0.31/
JSON converter that Does What I Want 
----
Lux-IO-0.06
http://search.cpan.org/~kentaro/Lux-IO-0.06/
A Perl Interface to Lux IO 
----
MQdb_0.953
http://search.cpan.org/~jms/MQdb_0.953/
----
Mail-Log-Parse-1.0400
http://search.cpan.org/~dstaal/Mail-Log-Parse-1.0400/
Parse and return info in maillogs 
----
Marpa-0.001_010
http://search.cpan.org/~jkegl/Marpa-0.001_010/
General BNF Parsing (Experimental version) 
----
MediaWiki-API-0.25
http://search.cpan.org/~exobuzz/MediaWiki-API-0.25/
Provides a Perl interface to the MediaWiki API (http://www.mediawiki.org/wiki/API) 
----
Muldis-D-0.64.0
http://search.cpan.org/~duncand/Muldis-D-0.64.0/
Formal spec of Muldis D relational DBMS lang 
----
OP-0.20
http://search.cpan.org/~aayars/OP-0.20/
Objective Perl 5 (Overpowered) 
----
OP-0.20_01
http://search.cpan.org/~aayars/OP-0.20_01/
Objective Perl 5 (Overpowered) 
----
POE-Component-Gearman-Client-0.02
http://search.cpan.org/~aar/POE-Component-Gearman-Client-0.02/
Asynchronous client module for Gearman for POE applications 
----
POE-Component-Gearman-Client-0.03
http://search.cpan.org/~aar/POE-Component-Gearman-Client-0.03/
Asynchronous client module for Gearman for POE applications 
----
POE-Component-IRC-Plugin-Bollocks-1.00
http://search.cpan.org/~bingos/POE-Component-IRC-Plugin-Bollocks-1.00/
A POE::Component::IRC plugin that talks bollocks. 
----
POE-Component-IRC-Plugin-CoreList-1.00
http://search.cpan.org/~bingos/POE-Component-IRC-Plugin-CoreList-1.00/
A POE::Component::IRC plugin that provides Module::CoreList goodness. 
----
POE-Component-IRC-Plugin-POE-Knee-1.08
http://search.cpan.org/~bingos/POE-Component-IRC-Plugin-POE-Knee-1.08/
A POE::Component::IRC plugin that runs Acme::POE::Knee races. 
----
POE-Component-IRC-Plugin-QueryDNS-1.00
http://search.cpan.org/~bingos/POE-Component-IRC-Plugin-QueryDNS-1.00/
A POE::Component::IRC plugin for IRC based DNS queries 
----
POE-Component-IRC-Plugin-QueryDNSBL-1.00
http://search.cpan.org/~bingos/POE-Component-IRC-Plugin-QueryDNSBL-1.00/
A POE::Component::IRC plugin for IRC based DNSBL queries 
----
POE-Component-IRC-Plugin-RSS-Headlines-1.08
http://search.cpan.org/~bingos/POE-Component-IRC-Plugin-RSS-Headlines-1.08/
A POE::Component::IRC plugin that provides RSS headline retrieval. 
----
POE-Component-IRC-Plugin-URI-Find-1.08
http://search.cpan.org/~bingos/POE-Component-IRC-Plugin-URI-Find-1.08/
A POE::Component::IRC plugin that finds URIs in channel traffic. 
----
POE-Filter-XML-RPC-0.02
http://search.cpan.org/~nperez/POE-Filter-XML-RPC-0.02/
A POE Filter for marshalling XML-RPC 
----
Path-Dispatcher-0.12
http://search.cpan.org/~sartak/Path-Dispatcher-0.12/
flexible and extensible dispatch 
----
SeeAlso-Server-0.55
http://search.cpan.org/~voj/SeeAlso-Server-0.55/
SeeAlso Linkserver Protocol Server 
----
Socialtext-Resting-0.27
http://search.cpan.org/~lukec/Socialtext-Resting-0.27/
module for accessing Socialtext REST APIs 
----
Socialtext-Resting-Utils-0.18
http://search.cpan.org/~lukec/Socialtext-Resting-Utils-0.18/
Utilities for Socialtext REST APIs 
----
Test-XT-0.01
http://search.cpan.org/~adamk/Test-XT-0.01/
Generate best practice author tests 
----
Text-Editor-Easy-0.46
http://search.cpan.org/~grommier/Text-Editor-Easy-0.46/
A perl module to edit perl code with syntax highlighting and more. 
----
UUID-Generator-PurePerl-0.04_01
http://search.cpan.org/~banb/UUID-Generator-PurePerl-0.04_01/
Universally Unique IDentifier (UUID) Generator 
----
Universe-Galaxy-0.01
http://search.cpan.org/~jkutej/Universe-Galaxy-0.01/
the missing piece in CPAN 
----
WWW-TasteKid-0.1.1
http://search.cpan.org/~dvwright/WWW-TasteKid-0.1.1/
A Perl interface to the API of TasteKid.com 
----
Xacobeo-0.08
http://search.cpan.org/~potyl/Xacobeo-0.08/
XPath (XML Path Language) visualizer. 


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: Fri, 17 Apr 2009 18:43:39 -0700 (PDT)
From: "g3rc4n@gmail.com" <g3rc4n@gmail.com>
Subject: Re: perls popularity
Message-Id: <e5c3bca5-8efb-4489-b11f-287879f4742a@o6g2000yql.googlegroups.com>

thanks for replys, i'm not trolling i was just curious


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

Date: Sat, 18 Apr 2009 01:14:00 +0300
From: Eric Pozharski <whynot@pozharski.name>
Subject: Re: Replacing text containing parenthesis
Message-Id: <slrnguhvrv.e72.whynot@orphan.zombinet>

On 2009-04-17, Mark Hobley <markhobley@hotpop.donottypethisbit.com> wrote:

(plz, don't get that as ranting)  I've seen you on USENET for some time
already, you're not supposed to ask such, excuse me, stupid questions.

*SKIP*
> find ./ -name Makefile.in -exec perl -pi -e \
> "s/\$\(top_srcdir\)\/\.\.\/config\/override\.m4//g;" {} \;

By an accident your I<-e> oneliner becomes

	{57028:35} [0:0]$ echo "s/\$\(top_srcdir\)\/\.\.\/config\/override\.m4//g;"
	s/$\(top_srcdir\)\/\.\.\/config\/override\.m4//g;

> Unfortunately, this gives an error:
>
> Unmatched ( in regex; marked by <-- HERE in m/( <-- HERE top_srcdir\)/\.\./ \
> config/override\.m4/ at -e line 1, <> line 1.

Not exactly.  I<$\> is a special variable for Perl, look it in
C<perldoc perlvar>.  By default it's B<undef>ined, so evaluates to empty
string, and since you don't C<use warnings;> (or I<-w> switch for
oneliners) you stay unaware of this.

Advice: get used to single quotes when writing one-liners.

As of leaning-teeth-sticks:

	's{\$\(top_srcdir\)/../config/override\.m4}{}g'

*CUT*

-- 
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom


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

Date: Sat, 18 Apr 2009 01:25:01 +0300
From: Eric Pozharski <whynot@pozharski.name>
Subject: Re: What does `my' do?!
Message-Id: <slrngui0gi.e72.whynot@orphan.zombinet>

On 2009-04-17, Tad J McClellan <tadmc@seesig.invalid> wrote:
> Eric Pozharski <whynot@pozharski.name> wrote:
>> On 2009-04-16, Ilya Zakharevich <nospam-abuse@ilyaz.org> wrote:
>>> I managed to confuse myself in a teaspoon...  Consider
>>>
>>>   perl -wle "my $x; BEGIN{ $x=12 } print $x"
>>>   12
>>
>> Fairly strange shell you have.
>
>
> That's what I thought too.
>
> Not actually that the shell was strange, but that it was strange
> for a programmer of Ilya's cluefulness to be using Windows (which
> was my erroneous guess as to why it was double quoted).
>
> I asked him, and he explained else-thread.

Yes, that came in next feed.  But I still puzled:  I suppose most of
answering party, has run that one-liner.  And I suppose they seemlesly
replaced double-quotes with single-quotes.  That must be some kind of
Perl-specific mental disorder -- anything after I<-e> switch should pass
shell unaffected, even if it wouldn't in case of copy-paste.

>
>> everyone are that
>> afraid of you that just prefered to skip that.  How you've managed them
>> into that fear?
>
>
> I am fearless!
>
> I am unmanageable!  (and so is my hair)

after 5years of unmanageble hair, then 10years of pony-tail, I've got
used to plait (for 5years already).  However, since I'm insane, you can
skip this consideration.


-- 
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom


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

Date: Fri, 17 Apr 2009 22:05:42 -0500
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: What does `my' do?!
Message-Id: <slrnguigs6.sfa.tadmc@tadmc30.sbcglobal.net>

Eric Pozharski <whynot@pozharski.name> wrote:
> On 2009-04-17, Tad J McClellan <tadmc@seesig.invalid> wrote:
>> Eric Pozharski <whynot@pozharski.name> wrote:
>>> On 2009-04-16, Ilya Zakharevich <nospam-abuse@ilyaz.org> wrote:
>>>> I managed to confuse myself in a teaspoon...  Consider
>>>>
>>>>   perl -wle "my $x; BEGIN{ $x=12 } print $x"
>>>>   12
>>>
>>> Fairly strange shell you have.
>>
>>
>> That's what I thought too.
>>
>> Not actually that the shell was strange, but that it was strange
>> for a programmer of Ilya's cluefulness to be using Windows (which
>> was my erroneous guess as to why it was double quoted).
>>
>> I asked him, and he explained else-thread.
>
> Yes, that came in next feed.  But I still puzled:  I suppose most of
> answering party, has run that one-liner.  And I suppose they seemlesly
> replaced double-quotes with single-quotes.  That must be some kind of
> Perl-specific mental disorder


Translating to the particular shell that you are using is
common even among those that do not share your affliction.


> However, since I'm insane,


I've noticed.


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


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

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 2349
***************************************


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