[26918] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 8895 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jan 29 03:05:29 2006

Date: Sun, 29 Jan 2006 00:05:06 -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, 29 Jan 2006     Volume: 10 Number: 8895

Today's topics:
         Re:  Q: Is the Perl CGI_MetaFAQ still being maintained <ron@savage.net.au>
        capturing [A-Z]+ in binary file - how? - EMASTER_Z (0/1 <a@yahoo.com>
        capturing [A-Z]+ in binary file - how? - EMASTER_Z (1/1 <a@yahoo.com>
    Re: cpp-style include for perl? <joe@inwap.com>
    Re: When were @- and @+ added <sisyphus1@nomail.afraid.org>
    Re: When were @- and @+ added <abigail@abigail.nl>
    Re: When were @- and @+ added <rvtol+news@isolution.nl>
    Re: When were @- and @+ added <sisyphus1@nomail.afraid.org>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sun, 29 Jan 2006 11:06:44 +1100
From:     Ron Savage <ron@savage.net.au>
Subject:  Re:  Q: Is the Perl CGI_MetaFAQ still being maintained?
Message-Id: <200612911644.110550@ron>

On Sun, 29 Jan 2006 06:13:22 +1100, brian d foy wrote:

Hi brian

> I guess I can still maintain it, but nobody has sent me anything
> about it. What would you like me to update? :)

Nothing! I just wanted to be sure that when I referred people to it, I was 
giving the most suitable URL.




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

Date: Sun, 29 Jan 2006 07:18:04 GMT
From: Steve D <a@yahoo.com>
Subject: capturing [A-Z]+ in binary file - how? - EMASTER_Z (0/1)
Message-Id: <krqot1tl02qv9qsild28l6jst74cn1sj7t@4ax.com>

$file_name = 'EMASTER_Z';

if (-B $file_name) {
    print "$file_name - is a binary file\n";
}
if (-T $file_name) {
    print "$file_name - is a text file\n";
}    
open (MASTER_IN, "<$file_name") ||
	die "unable to open $file_name file $!";
binmode(STDOUT);
binmode(MASTER_IN);
print "\n----------------- 0 ----------------------\n";
### lets me see the file as it is
print STDOUT <MASTER_IN>;

print "\n----------------- 1 ----------------------\n";
### place data into variable or array
### goal is to capture all text data but no matter what I do nothing
works
### have tried unpack but I do not fully understand it
@master_array = <MASTER_IN>;   
  chomp @master_array;
  
  $var = pop(@master_array);
print STDOUT $var;
print "--------- done -----------\n";

## what am I doing wrong, or do not understand"
# thanks in advance


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

Date: Sun, 29 Jan 2006 07:18:04 GMT
From: Steve D <a@yahoo.com>
Subject: capturing [A-Z]+ in binary file - how? - EMASTER_Z (1/1)
Message-Id: <d1rot1l8ikhprrrlmk5877eo87jkhn191t@4ax.com>


begin 644 EMASTER_Z
M%0`<````````````````````````````````````````````````````````
M`````&O^9X,H0RD@,C`P-"!(475O=&5S+F-O;2!-441O=VYL;V%D97(@("`@
M("`@("``````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````-C8.````!W\`(`!:1%(```````````````````````!:
M15)/($1)5DE$14Y$(%)%````````````````1````+`?>4D`````V#R`20``
M````````````````````````````````````````````````````````````
M````NWPQ`0```````````%I%4D\@1$E6241%3D0@4D5#3U9%4ED@1E5.1```
M````````````````````````````````-C8$````!W\`(`!:4$<`````````
M``````````````!:15)/(%!2149%4D5.0T4`````````````````1````"#F
M<4D`````P#R`20``````````````````````````````````````````````
M````````````````````(@DQ`0```````````%I%4D\@4%)%1D5214Y#12!'
M4D]75$@@5%)54U0`````````````````````````````````-C8%````!W\`
M(`!:4$=?50````````````````````!:15)/(%!2149%4D5.0T4`````````
M````````1````,#E<4D`````4#^`20``````````````````````````````
M````````````````````````````````````'`DQ`0```````````%I%4D\@
M4%)%1D5214Y#12!'4D]75$@@5%)54U0@5513````````````````````````
M````-C8&````!W\`(`!:4$=/``````````````````````!:15)/(%!2149%
M4D5.0T4`````````````````1````&#^<4D`````4#R`20``````````````
M````````````````````````````````````````````````````I@HQ`0``
M`````````%I%4D\@4%)%1D5214Y#12!'4D]75$@@5%)54U0@6B!$5E!&````
M````````````````````-C8/````!W\`(`!:24T`````````````````````
M``!:22!-141)0T%,````````````````````````1````"`F>4D`````(#:`
M20``````````````````````````````````````````````````````````
M````````(GTQ`0``````````````````````````````````````````````
M````````````````````````````````````-C8,````!W\`(`!:3U@`````
M``````````````````!:24Y#3U@@4D533U520T53````````````````1```
M`*#@=DD`````4#^`20``````````````````````````````````````````
M````````````````````````RE@Q`0``````````````````````````````
M````````````````````````````````````````````````````-C8+````
M!W\`(`!:3T\```````````````````````!:3T\@1$E'251!3"!'4D]5````
M````````````1````)"Z=DD`````4#^`20``````````````````````````
M````````````````````````````````````````:58Q`0```````````%I/
M3R!$24=)5$%,($=23U50````````````````````````````````````````
M````````-C8'````!W\`(`!:5$8```````````````````````!:3U1%1D]!
M35,`````````````````````````1````-`!:$D`````&#V`20``````````
M````````````````````````````````````````````````````````W6HP
M`0``````````````````````````````````````````````````````````
M````````````````````````-C8)````!W\`(`!:650`````````````````
M``````!:65123TY)0P``````````````````````````1````"!0=$D`````
M4#^`20``````````````````````````````````````````````````````
M````````````PB\Q`0``````````````````````````````````````````
M````````````````````````````````````````-C80````!W\`(`!:65H`
M``````````````````````!:65I91UD`````````````````````````````
M1````-`K>4D`````4#^`20``````````````````````````````````````
M````````````````````````````?7TQ`0``````````````````````````
M````````````````````````````````````````````````````````-C82
M````!W\`(`!:55).40````````````````````!:55))0T@@1DE.04Y#10``
M````````````````1````&#N?4D`````4#^`20``````````````````````
M````````````````````````````````````````````ILDQ`0``````````
M````````````````````````````````````````````````````````````
M````````````-C83````!W\`(`!:14Q1``````````````````````!:14Q1
M````````````````````````````````1````)#\?4D`````2#.`20``````
M````````````````````````````````````````````````````````````
MB<HQ`0``````````````````````````````````````````````````````
M````````````````````````````-C84````!W\`(`!:5%@`````````````
M``````````!:5%@`````````````````````````````````1````*`"?DD`
M````4#^`20``````````````````````````````````````````````````
M````````````````ZLHQ`0``````````````````````````````````````
M````````````````````````````````````````````-C85````!W\`(`!:
M3E167U=1``````````````````!:3E167U=1````````````````````````
M````1````/`.?DD`````$`]^20``````````````````````````````````
M````````````````````````````````K\LQ`0``````````````````````
M````````````````````````````````````````````````````````````
M-C86````!W\`(`!:3E1640````````````````````!:3E1640``````````
M````````````````````1````$`/?DD`````4#^`20``````````````````
M````````````````````````````````````````````````M,LQ`0``````
M````````````````````````````````````````````````````````````
M````````````````-C87````!W\`(`!:05(```````````````````````!:
M05(`````````````````````````````````1````&`5?DD`````4#^`20``
M````````````````````````````````````````````````````````````
M````%LPQ`0``````````````````````````````````````````````````
M````````````````````````````````-C88````!W\`(`!:4DP`````````
M``````````````!:4DP`````````````````````````````````1````&`5
M?DD`````2#^`20``````````````````````````````````````````````
M````````````````````%LPQ`0``````````````````````````````````
M````````````````````````````````````````````````-C89````!W\`
M(`!:5%(```````````````````````!:5%(`````````````````````````
M````````1````-`O@$D`````&#V`20``````````````````````````````
M````````````````````````````````````NO`Q`0``````````````````
M````````````````````````````````````````````````````````````
M````-C8:````!W\`(`!:2$<```````````````````````!:2$<`````````
M````````````````````````1``````S@$D`````4#^`20``````````````
M````````````````````````````````````````````````````(/$Q`0``
M````````````````````````````````````````````````````````````
M````````````````````-C8;````!W\`(`!:0D$`````````````````````
M``!:0D$`````````````````````````````````1````#`S@$D`````4#^`
M20``````````````````````````````````````````````````````````
M````````)O$Q`0``````````````````````````````````````````````
M````````````````````````````````````-C8<````!W\`(`!:15-4````
M``````````````````!:15-4````````````````````````````````1```
M`*`V@$D`````&#V`20``````````````````````````````````````````
M````````````````````````E/$Q`0``````````````````````````````
G````````````````````````````````````````````````````
`
end


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

Date: Sat, 28 Jan 2006 16:08:42 -0800
From: Joe Smith <joe@inwap.com>
Subject: Re: cpp-style include for perl?
Message-Id: <nvudnc_oRIwFmkHeRVn-vw@comcast.com>

Mike Ballard wrote:

> I also discovered that I'm only getting the shell error 'file not found'
> when using cperl-db/emacs; run from c/l everything works acceptably.

Last time I had something like this happen to me, I used the editor
to create and run a single-line program:
	system("pwd");

The editor was using /tmp instead of $HOME.


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

Date: Sun, 29 Jan 2006 11:00:34 +1100
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: When were @- and @+ added
Message-Id: <43dc0632$0$23262$afc38c87@news.optusnet.com.au>


"Abigail" <abigail@abigail.nl> wrote in message

>
>     $ /opt/perl/5.005_04/bin/perl -wle '"foo" =~ /o/g; print scalar @-'
>     0
>     $ /opt/perl/5.6.0/bin/perl -wle '"foo" =~ /o/g; print scalar @-'
>     1
>

Ummm ... does the 'g' switch have some application in a "matching" (as
opposed to "substituting") regular expression ? ... or is that simply a typo
?

I find the 'g' switch, used like that, is producing some very weird results.
For example, whilst that one liner outputs '1' for me, the following script
outputs '808482909':

use warnings;
"foo" =~ /o/g;
print scalar @-;

If I don't 'use warnings;' in that script, it reverts to outputting '1'.

Cheers,
Rob




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

Date: 29 Jan 2006 01:00:46 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: When were @- and @+ added
Message-Id: <slrndto4tu.e1.abigail@alexandra.abigail.nl>

Sisyphus (sisyphus1@nomail.afraid.org) wrote on MMMMDXXXIV September
MCMXCIII in <URL:news:43dc0632$0$23262$afc38c87@news.optusnet.com.au>:
))  
))  "Abigail" <abigail@abigail.nl> wrote in message
))  
)) >
)) >     $ /opt/perl/5.005_04/bin/perl -wle '"foo" =~ /o/g; print scalar @-'
)) >     0
)) >     $ /opt/perl/5.6.0/bin/perl -wle '"foo" =~ /o/g; print scalar @-'
)) >     1
)) >
))  
))  Ummm ... does the 'g' switch have some application in a "matching" (as
))  opposed to "substituting") regular expression ? ... or is that simply a typo
))  ?

It doesn't matter whether /g is used or not.

))  I find the 'g' switch, used like that, is producing some very weird results.
))  For example, whilst that one liner outputs '1' for me, the following script
))  outputs '808482909':
))  
))  use warnings;
))  "foo" =~ /o/g;
))  print scalar @-;
))  
))  If I don't 'use warnings;' in that script, it reverts to outputting '1'.


I can't reproduce that with any version of Perl that supports @-.



Abigail
-- 
$_ = "\x3C\x3C\x45\x4F\x54";
print if s/<<EOT/<<EOT/e;
Just another Perl Hacker
EOT


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

Date: Sun, 29 Jan 2006 02:20:52 +0100
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: When were @- and @+ added
Message-Id: <drh90m.nc.1@news.isolution.nl>

Abigail schreef:
> Sisyphus:

>>  use warnings;
>>  "foo" =~ /o/g;
>>  print scalar @-;
>>
>>  If I don't 'use warnings;' in that script, it reverts to
>> outputting '1'. 
> 
> I can't reproduce that with any version of Perl that supports @-.


perl, v5.8.6 built for i386-freebsd-64int 

$ perl -e 'use strict; use warnings; "foo" =~ /o/g; print scalar @-'
134641065

$ perl -e 'use warnings; "foo" =~ /o/g; print scalar @-'
134621613

$ perl -e '"foo" =~ /o/g; print scalar @-'
1

Without the g-modifier they all print '1'.

-- 
Affijn, Ruud

"Gewoon is een tijger."


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

Date: Sun, 29 Jan 2006 18:51:41 +1100
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: When were @- and @+ added
Message-Id: <43dc749c$0$15126$afc38c87@news.optusnet.com.au>


"Abigail" <abigail@abigail.nl> wrote in message

>
> ))  I find the 'g' switch, used like that, is producing some very weird
results.
> ))  For example, whilst that one liner outputs '1' for me, the following
script
> ))  outputs '808482909':
> ))
> ))  use warnings;
> ))  "foo" =~ /o/g;
> ))  print scalar @-;
> ))
> ))  If I don't 'use warnings;' in that script, it reverts to outputting
'1'.
>
>
> I can't reproduce that with any version of Perl that supports @-.
>

Sorry - I meant to specify that I was using perl 5.8.7 on Win32.

The following script just hangs forever (with no output), then segfaults
when I kill the script (with Ctrl-C):

use warnings;
$foo = 'ffooooo';
$foo =~ /o/g;
print "@-";

I don't think it's critical since removal of the 'g' modifier solves the
problem. Should I file a bug report about this ?

Cheers,
Rob




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

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


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