[26604] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 8728 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Dec 1 14:05:33 2005

Date: Thu, 1 Dec 2005 11:05:07 -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           Thu, 1 Dec 2005     Volume: 10 Number: 8728

Today's topics:
        How to push some file to user, without show path of fil <marko@ginat.com>
    Re: How to push some file to user, without show path of <glex_no-spam@qwest-spam-no.invalid>
    Re: How to tell if a method exists <jeff@schwabcenter.com>
        Is it needed to lock open file for write? <info@t-com.hr>
    Re: My experience with XML::DOM VS XML::LibXML <notvalid@email.com>
    Re: Whats the reason for this?? (Anno Siegel)
    Re: Whats the reason for this?? <someone@example.com>
    Re: Whats the reason for this?? (Anno Siegel)
    Re: Whats the reason for this?? <sdn.girths00869@zoemail.net>
    Re: Whats the reason for this?? <jurgenex@hotmail.com>
    Re: Whats the reason for this?? <tadmc@augustmail.com>
    Re: Whats the reason for this?? <bernard.el-haginDODGE_THIS@lido-tech.net>
    Re: Whats the reason for this?? <xx087@freenet.carleton.ca>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 1 Dec 2005 18:17:38 +0100
From: "news.t-com.hr" <marko@ginat.com>
Subject: How to push some file to user, without show path of file?
Message-Id: <dmnb7e$53d$1@ss405.t-com.hr>

How to push some file to user, without show path of file?




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

Date: Thu, 01 Dec 2005 11:54:51 -0600
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: How to push some file to user, without show path of file?
Message-Id: <LNGjf.9$2_5.931@news.uswest.net>

news.t-com.hr wrote:
> How to push some file to user, without show path of file?

Hu?

Is this a hidden CGI/HTML question?


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

Date: Wed, 30 Nov 2005 23:20:39 GMT
From: Jeffrey Schwab <jeff@schwabcenter.com>
Subject: Re: How to tell if a method exists
Message-Id: <btqjf.18$7b4.14525@twister.southeast.rr.com>

Brian Miller wrote:
> Hello All,
> 
> I am attempting to find a way to see if a method exists within a 
> specific package. I cannot use the PACKAGE->can(method) because
> it follows the class hierarchy and it is possible that the method
> exists somewhere else. What I was hopping to do is to have a base class

Let's call this base class BaseClass.

> that scans the class hierarchy of an object

Let's call this object Object, and its class ObjectClass.  Is 
ObjectClass a descendant of BaseClass?  Also, I thought the problem with 
PACKAGE->can(method) was that method might not be in the class 
hierarchy, so why do you want to scan that hierarchy?

> and executes (in a specific
> order) a method (let's say post_init).

Do you mean the post_init method of each class in ObjectClass's hierarchy?

> This would eliminate the need
> for each method to run through it's package @ISA array and execute the
> parents version of the method.

 ....at the expense of having a method in BaseClass run through the same 
set of classes.  Or have I misunderstood?



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

Date: Thu, 1 Dec 2005 18:15:41 +0100
From: "news.t-com.hr" <info@t-com.hr>
Subject: Is it needed to lock open file for write?
Message-Id: <dmnb3o$4rd$1@ss405.t-com.hr>

Is it needed to lock open file for write?

use Fcntl qw(:flock);
open(FH, ">codes.txt") or die "can't open codes.txt $!";
flock(FH, LOCK_EX) or die "can't flock codes.txt $!";

Or is also good only to use command open

          open(FH, ">codes.txt") or die "can't open codes.txt $!";


TNX




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

Date: Thu, 01 Dec 2005 17:59:29 GMT
From: Ala Qumsieh <notvalid@email.com>
Subject: Re: My experience with XML::DOM VS XML::LibXML
Message-Id: <5SGjf.22761$D13.21826@newssvr11.news.prodigy.com>

robic0 wrote:
> On Thu, 1 Dec 2005 10:49:38 +0530, Jahagirdar Vijayvithal S
> <jvs@india.ti.com> wrote:

[snip]

>>	while(<XML>){
>>		#print;
>>		if(my $range=/<packet>/.../<\/packet>/){
> 
>                             ^          ^^^
>                          bad Perl?    (...) capture?

No, this is good Perl. This is not a regexp, but a range operator.

--Ala


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

Date: 1 Dec 2005 11:09:52 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Whats the reason for this??
Message-Id: <dmmlm0$gib$1@mamenchi.zrz.TU-Berlin.DE>

JP  <recker_us@yahoo.com> wrote in comp.lang.perl.misc:
> perl -e '1+1+1'
> The  answer is 3.
> 
> but
> 
> perl -e 'print (1+1)+1'
> 
> thje answer in this case is 2.
> Any  explination  why I get geting a  different value in the second  case??

Consult the documentation of the function you're using.  In "perldoc
-f printf", note the sentence beginning "Also be careful..." near the
end.

Anno
-- 
If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article.  Click on 
"show options" at the top of the article, then click on the 
"Reply" at the bottom of the article headers.


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

Date: Thu, 01 Dec 2005 11:36:00 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: Whats the reason for this??
Message-Id: <AeBjf.142580$yS6.40545@clgrps12>

Anno Siegel wrote:
> JP  <recker_us@yahoo.com> wrote in comp.lang.perl.misc:
>>perl -e '1+1+1'
>>The  answer is 3.
>>
>>but
>>
>>perl -e 'print (1+1)+1'
>>
>>thje answer in this case is 2.
>>Any  explination  why I get geting a  different value in the second  case??
> 
> Consult the documentation of the function you're using.  In "perldoc
> -f printf", note the sentence beginning "Also be careful..." near the
> end.

The OP will probably find that sentence easier using "perldoc -f print".

:-)

John
-- 
use Perl;
program
fulfillment


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

Date: 1 Dec 2005 11:37:58 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Whats the reason for this??
Message-Id: <dmmnam$hnn$2@mamenchi.zrz.TU-Berlin.DE>

John W. Krahn <krahnj@telus.net> wrote in comp.lang.perl.misc:
> Anno Siegel wrote:
> > JP  <recker_us@yahoo.com> wrote in comp.lang.perl.misc:
> >>perl -e '1+1+1'
> >>The  answer is 3.
> >>
> >>but
> >>
> >>perl -e 'print (1+1)+1'
> >>
> >>thje answer in this case is 2.
> >>Any  explination  why I get geting a  different value in the second  case??
> > 
> > Consult the documentation of the function you're using.  In "perldoc
> > -f printf", note the sentence beginning "Also be careful..." near the
> > end.
> 
> The OP will probably find that sentence easier using "perldoc -f print".

Oh my.  Where did that "f" come from?

Anno
-- 
If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article.  Click on 
"show options" at the top of the article, then click on the 
"Reply" at the bottom of the article headers.


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

Date: Thu, 01 Dec 2005 06:09:51 -0600
From: "Eric J. Roode" <sdn.girths00869@zoemail.net>
Subject: Re: Whats the reason for this??
Message-Id: <Xns971F4922F9347sdn.comcast@216.196.97.136>

JP <recker_us@yahoo.com> wrote in news:z0Bjf.8$MC6.52@news.oracle.com:

> perl -e '1+1+1'
> The  answer is 3.
> 
> but
> 
> perl -e 'print (1+1)+1'
> 
> thje answer in this case is 2.
> Any  explination  why I get geting a  different value in the second 
> case?? 

For Perl operators like print, the rule is "If it LOOKS like a function 
call, it BEHAVES like a function call."

-- 
Eric
`$=`;$_=\%!;($_)=/(.)/;$==++$|;($.,$/,$,,$\,$",$;,$^,$#,$~,$*,$:,@%)=(
$!=~/(.)(.).(.)(.)(.)(.)..(.)(.)(.)..(.)......(.)/,$"),$=++;$.++;$.++;
$_++;$_++;($_,$\,$,)=($~.$"."$;$/$%[$?]$_$\$,$:$%[$?]",$"&$~,$#,);$,++
;$,++;$^|=$";`$_$\$,$/$:$;$~$*$%[$?]$.$~$*${#}$%[$?]$;$\$"$^$~$*.>&$=`


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

Date: Thu, 01 Dec 2005 12:18:20 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Whats the reason for this??
Message-Id: <gSBjf.2557$wD4.2052@trnddc02>

JP wrote:
> perl -e '1+1+1'
> The  answer is 3.
>
> but
>
> perl -e 'print (1+1)+1'
>
> thje answer in this case is 2.
> Any  explination  why I get geting a  different value in the second case??

Maybe because (1+1) is 2?

jue 




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

Date: Thu, 1 Dec 2005 06:15:08 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Whats the reason for this??
Message-Id: <slrndotqac.c2e.tadmc@magna.augustmail.com>

JP <recker_us@yahoo.com> wrote:
> perl -e '1+1+1'
> The  answer is 3.
> 
> but
> 
> perl -e 'print (1+1)+1'
> 
> thje answer in this case is 2.


Try it with warnings enabled:

   perl -we  'print (1+1)+1'


> Any  explination  why I get geting a  different value in the second  case??


   Message-Id: <slrnatq036.2q2.tadmc@magna.augustmail.com>


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Thu, 1 Dec 2005 14:21:20 +0100
From: "Bernard El-Hagin" <bernard.el-haginDODGE_THIS@lido-tech.net>
Subject: Re: Whats the reason for this??
Message-Id: <Xns971F9208DDDA6elhber1lidotechnet@10.232.40.227>

anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote:

[...]

>> > Consult the documentation of the function you're using.  In
>> > "perldoc -f printf", note the sentence beginning "Also be
>> > careful..." near the end.
>> 
>> The OP will probably find that sentence easier using "perldoc -f
>> print". 
> 
> Oh my.  Where did that "f" come from?


print lc $1 if 'Freudian slip' =~ m/(.)/;


-- 
Cheers,
Bernard


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

Date: 1 Dec 2005 17:03:35 GMT
From: Glenn Jackman <xx087@freenet.carleton.ca>
Subject: Re: Whats the reason for this??
Message-Id: <slrndoub78.f6g.xx087@smeagol.ncf.ca>

At 2005-12-01 06:03AM, JP <recker_us@yahoo.com> wrote:
>  perl -e '1+1+1'
>  The  answer is 3.
>  
>  but
>  
>  perl -e 'print (1+1)+1'
>  
>  thje answer in this case is 2.
>  Any  explination  why I get geting a  different value in the second  case??

This may shed some light on the destination of the "lost" "+1":
    perl -le '$result = print(3+5)+10; print $result'
    8
    11


-- 
Glenn Jackman
Ulterior Designer


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

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


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