[25690] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 7931 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Apr 1 06:05:23 2005

Date: Fri, 1 Apr 2005 03:05:09 -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           Fri, 1 Apr 2005     Volume: 10 Number: 7931

Today's topics:
    Re: $line = <FH> returns incomplete lines robic0@yahoo.com
    Re: $line = <FH> returns incomplete lines robic0@yahoo.com
    Re: (",) Do You Want To Know For Sure You Are Going To  robic0@yahoo.com
    Re: file name from command line robic0@yahoo.com
    Re: file name from command line robic0@yahoo.com
    Re: Getting Perl to ignore Letters when calculating num (Anno Siegel)
    Re: I was an asshole. I apologize. robic0@yahoo.com
    Re: Looking for a PERL version of "filetime" (Anno Siegel)
    Re: Need syntax/small footprint help robic0@yahoo.com
    Re: Need syntax/small footprint help robic0@yahoo.com
    Re: Need syntax/small footprint help (Anno Siegel)
    Re: Need syntax/small footprint help robic0@yahoo.com
    Re: newbie question: display xmlfile robic0@yahoo.com
    Re: Perl script hangs (Kurt)
        Perl User Name/Password issue <shabbirmala@gmail.com>
        Posting Guidelines for comp.lang.perl.misc ($Revision:  tadmc@augustmail.com
    Re: slicing syntax question robic0@yahoo.com
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Fri, 01 Apr 2005 02:01:17 -0800
From: robic0@yahoo.com
Subject: Re: $line = <FH> returns incomplete lines
Message-Id: <k66q4154rmcigtunmvnhn7jig7iad6mk55@4ax.com>

On Sun, 27 Mar 2005 01:04:57 GMT, "A. Sinan Unur"
<1usa@llenroc.ude.invalid> wrote:

>"robic0@yahoo.com" <robic0@yahoo.com> wrote in 
>news:1111883917.944106.105020@l41g2000cwc.googlegroups.com:
>
>> Obviously they can't write algorythms, and are the rudest
>> people on usenet.
>
>Since you seem to place a high value on being able to write algorithms, 
>you might be interested in learning about the origin of the word:

Oh, haven't read any of your crap, but u already knew that b4
u posted it because it wasen't intended to educate me in the
professional sense, it was meant to degrade and humiliate.
Well obviously u don't know the origin of you. You came
from a woman I fucked the shit out of 20 years ago !!!
HEHE, take it to the bank!

>
>http://en.wikipedia.org/wiki/Algorithm#History
>
>> Folks welcome to nazi *lang* land 
>
>http://www.faqs.org/faqs/usenet/legends/godwin/
>
>> which mostly originates from 3rd world countries
>
>:)
>
>> by people who steal American jobs. I will cut and past my concerns to
>> Google as well as to my congressman and President Bush as I really do 
>> believe you undermime
>
>How do you undermime something?
You get on your knees and under*mine* their assholes.... jeesh
>
>> American culture and should be banned from the US. I know people in
>> congress and I will cc them too. I think that you foreigners should
>> not be allowed to belittle Americans and behave so rudely.
>
>No one belittled Americans. We tried to show an ignorant fool the error 
>of his ways, but he was not listening. The fact that he is from the 
>U.S.A. is of no relevance to the issues that were brought up.
>
So all us U.S.A. assholes are an ignorant lot of jackoffs... huh?

>> I really wish this server would be dissolved and re-built without
>> the extremely rude people involved with its maintanence.
>
>You really do not understand how the newsgroups work, do you?
>
Yes, you use news papers to wipe your asshole when you shit
because no one would give you a job... fuuu christ sakes!!!

>Incidentally, Adelphia High Speed Internet and Google Groups will be 
>more concerned about your abusive behavior than anything else that was 
>said in these threads.
>
Again, with this statement your neck should be alleviated of its
limited weight. Should you feel that Google or Adelphia allow this 
abuse upon yourself you should not hesitate to complain to the
World Bank. . . . what an asshole!

>Sinan
>
>PS: I know, I broke my promise.



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

Date: Fri, 01 Apr 2005 02:51:03 -0800
From: robic0@yahoo.com
Subject: Re: $line = <FH> returns incomplete lines
Message-Id: <i38q41pj7jl51tcpp7tq0fcv94ve4k5n67@4ax.com>

On Sat, 26 Mar 2005 23:59:42 -0700, Chris Barts
<chbarts+usenet@gmail.com> wrote:

>robic0@yahoo.com wrote:
>> What does GPL, character class, Tail or personal insults have to do
>> with anything
>> this gentleman posted a question about? 
>
>What does this rant have to do with my comment, to which it is 
>apparently a follow-up?
>
>> Obvious lurkers who have power trips.
>
>As opposed to moronic whackadoos who have power trips?
>
>> Keep this rude behaviour up and this group will dissolve
>> I assure you.
>
>Imminent Death of The Net Predicted!
>
>Begone, loser. You are but a flyspeck on the long history of Usenet.
>
>:plonk:

Hey thanks Chris.
I don't know of the GPL cut/paste thing you referr too (but i'm gonna
find out).

All I know is that some  really strange people here and have done
nothing but attacked me what ever I post (right or wrong).
Could be I (and like any other human being) make mistakes.
Jeez, whats the test for that? Don't everybody take a shit in the 
morning/night and don't it stink?

Well, after your post, I offered the real solution to OP's problem.
It didn't relate to GPL. Here it is:

Thanks!
-rfc


=============================
$line = '';
while(1) {
while ( ($line .= <MYLOG> ) )
{
	if ($line =~ /[\n]+/) {
		print ("GOT THIS: ",$line);
		$line = '';
	}
}
seek (MYLOG,0, 1);
sleep (1);
}

Quote from somewhere: "each call reads and returns the next line,
until
end-of-file is reached".
'seek (MYLOG,0, 1)' is resetting the eof condition on the FH which you
get everytime.
It just so happends there was no "\n" in the last chars flushed from
the buffer but it does go to an eof.
<MYLOG> will return on $/ or eof otherwise it would not return at the
end.




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

Date: Fri, 01 Apr 2005 01:42:21 -0800
From: robic0@yahoo.com
Subject: Re: (",) Do You Want To Know For Sure You Are Going To Heaven?
Message-Id: <7o5q419m6t69jsfh9ldrrt0tebv64ropsd@4ax.com>

On Fri, 25 Mar 2005 19:32:17 -0500, Wes Groleau
<groleau+news@freeshell.org> wrote:

>robic0@yahoo.com wrote:
>> Is there anything that can be said of this?
>
>You just said nine words too many,
>and I beat you by four.

How many I need to say to win the $million
dollar right wing religeous nazi party raffel,
sponsored by George Bush, dude?



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

Date: Fri, 01 Apr 2005 01:44:42 -0800
From: robic0@yahoo.com
Subject: Re: file name from command line
Message-Id: <ev5q419gnco0psq90lek5j1iokitbvqd60@4ax.com>

On Thu, 24 Mar 2005 07:30:42 -0600, Tad McClellan
<tadmc@augustmail.com> wrote:

>Tad McClellan <tadmc@augustmail.com> wrote:
>> robic0@yahoo.com <robic0@yahoo.com> wrote:
>> 
>>> if (!@ARGV) {
>>> 	print "Enter a filename as a cmdline argument.\n";
>>> 	exit (1);
>>> }
>> 
>> 
>> Error message should go on STDERR, so you can replace
>> that whole if statement with:
>> 
>>    warn "Enter a filename as a cmdline argument.\n" unless @ARGV;
>
>
>Doh!
>
>I meant die() instead of warn(), else there will be no exit().

What the fuck do u mean man?



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

Date: Fri, 01 Apr 2005 01:45:49 -0800
From: robic0@yahoo.com
Subject: Re: file name from command line
Message-Id: <816q41lhmk23sfcies41sv2btbunfahov2@4ax.com>

On Thu, 24 Mar 2005 07:30:42 -0600, Tad McClellan
<tadmc@augustmail.com> wrote:

>Tad McClellan <tadmc@augustmail.com> wrote:
>> robic0@yahoo.com <robic0@yahoo.com> wrote:
>> 
>>> if (!@ARGV) {
>>> 	print "Enter a filename as a cmdline argument.\n";
>>> 	exit (1);
>>> }
>> 
>> 
>> Error message should go on STDERR, so you can replace
>> that whole if statement with:
>> 
>>    warn "Enter a filename as a cmdline argument.\n" unless @ARGV;
>
>
>Doh!
>
>I meant die() instead of warn(), else there will be no exit().

What the fuck did u mean man?




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

Date: 1 Apr 2005 08:13:04 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Getting Perl to ignore Letters when calculating numbers.
Message-Id: <d2ivqg$9bg$1@mamenchi.zrz.TU-Berlin.DE>

Tad McClellan  <tadmc@augustmail.com> wrote in comp.lang.perl.misc:
> bass150db <bass150db@gmail.com> wrote:

> > chomp (@stock);
> > 
> > foreach $stock (@stock) {
> 
> 
> There is no reason to read the entire file into an array only
> to process the array a line at a time anyway.
> 
> Just process a line at a time without the need for the @stock
> temporary variable.
> 
>    foreach my $stock ( <STOCKFILE> ) {
>       chomp $stock;

That reads all of the file in memory too.  Surely you meant to suggest
a while loop:

    while ( my $stock = <STOCKFILE> ) {

Anno


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

Date: Fri, 01 Apr 2005 02:31:56 -0800
From: robic0@yahoo.com
Subject: Re: I was an asshole. I apologize.
Message-Id: <pk8q41pghcfu57ugp4m8imja25ptrfjv3k@4ax.com>

On Wed, 30 Mar 2005 01:29:11 GMT, Jean Paul Sartre
<infos@leocharre.com> wrote:

>I was an asshole. I apologize.
>I haven't spammed before. 
>I am honestly a developer/ designer. Or was until I sinned.
>I'm sorry. I was an asshole.
>I don't mean to offend the community, and I realize that's what I did.
>
>ean Paul Sartre <infos [at] leocharre.com> wrote in
>news:pan.2005.03.15.21.34.38.703201 [at] leocharre.com:
>
>> I found a solution to my problem. This <a
>> href="http://b3thm00n.com/scripting/index_gallery/">perl thumbnail
>> automatic gallery</a> is quick and instant to install. It looks kind of
>> simple though. I could work on it some more, maybe change it.
>> JPS
>
>Hi Leo:
>
>If you want people to comment on various parts of your script, then
>solicit advice openly.
>
>If you just want to announce the availability of your script, this is not
>the place to do it.
>
>To announce it in this "stealth" manner is called spamming.
>
>Sinan.

Fuck off u rude asshole Sinorn, hey infos, let your code rip man
cut and past the bastard right here::::

here ->



<----
Me and my friends will analyze the hell out of it dude!
-rfc






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

Date: 1 Apr 2005 08:28:11 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Looking for a PERL version of "filetime"
Message-Id: <d2j0mr$9bg$2@mamenchi.zrz.TU-Berlin.DE>

Michael Zawrotny  <zawrotny@sb.fsu.edu> wrote in comp.lang.perl.misc:
> phynkel@yahoo.com <phynkel@yahoo.com> wrote:
> >  We have a compiled program (no source) on our SUN machines called
> >  filetime. If you run it against a file name it returns with the number
> >  of seconds from 1/1/1970. We use it to flag files older than a fixed
> >  date
> > 
> >  Looking for same thing in PERL or C for use of Linux
> 
> It's not a perl solution, but many versions of linux come with a
> user-level utility called "stat".  See "man 1 stat" for details,
> in particular the %x, %X, %y, %Y, %z, %Z formatting options.

You should take a look at the Perl documentation before answering
questions.  Perl has a stat() function as well.

Anno


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

Date: Fri, 01 Apr 2005 00:33:32 -0800
From: robic0@yahoo.com
Subject: Re: Need syntax/small footprint help
Message-Id: <6rup41pgna3ltg2f4583gcbu0jrn93ao4m@4ax.com>

On Sun, 27 Mar 2005 10:28:12 +0000, Brian McCauley <nobull@mail.com>
wrote:

>
>
>robic0@yahoo.com wrote:
>
>> Hello, last month I wrote a rather large 10,000 line program that
>> parses xml (expat). The data is read into compound structures
>> then analyzed later. Below is one of the subroutines. I would like
>> to make it smaller so that its easier to read and understand and
>> also make the regular expressions less complicated for performance.
>> Any ideas?
>> 
>> ---------------------------
>> sub eCHK_RegDel       ## -- checks Redundant Regkey Delete // Regkey
>> exists --
>> {
>> 	my ($details) = @_;
>> 	return 1 if (@{$details} == 0);
>
>   return 1 unless @$details;
yes, the same
>
>But actually this is, I think, redundant.  There is no point since if 
>@$details is empty so will @regdel so nothing will happen anyhow.
>
return from @details empty check comes b4 @regdel population?

>Why are you returning 1? You don't seem to be bothering about the 
>returning anything in other situations so I infer that nothing is 
>considering the return value of eCHK_RegDel.

right, I paid no attention to the return condition at the end of the
sub. where its called from pays no attention to return codes as of
yet.
>
>> 	my @regdel = ();
>> 	for (@$details) {
>> 		my $aref = $_->[0];
>> 		push (@regdel, $aref) if ($aref->[5] eq $REGISTRY && $aref->[6] eq
>> $DELETE);
>> 	}
>
>my @regdel =
>    grep { $_->[5] eq $REGISTRY && $_->[6] eq $DELETE )
>    map { $_->[0] } @$details;
>
>
>> 	if (@regdel)
>> 	{
>
>Again this is redundant.  "If the next line would do nothing then don't 
>do it".  But if the next line would do nothing there's no cost in doing 
>it anyhow.

It may look weird but I assure you its the same push return addr onto
the stack register without a goto.
also,  its proper form that more code may end up below "if" statement,
large code dictates you leave the door open.
>
>> 		## check that KeyName exists
>> 		for (@regdel) {
>> 			my $aref = $_;
>
>You don't need the value in $_ so simply:
>
>  		for my $aref (@regdel) {
>
writing freehand code from top to bottom, it is a rarety you will know
what the final outcome will be. not alot of time to go back...
but sometimes
>> 			next if (exists ($aref->[4]{$KEYNAME}) &&
>> length($aref->[4]{$KEYNAME}) > 0);
>
>You mean defined() not exists().
>
>length() can never be negative so >0 is redundant.
>
Not true... $aref->[4]{$KEYNAME} is dynamic. it MUST exist
and if it does is sometimes zero length, which is a condition
that is unacceptable...

>There could be a case for simply using no warnings 'uninitialized' here.
>
>> 			# log error
>> 			## 0701 -- test 07,01
>> 			ReportItem ('E', $CLOGINFO, $CERRLOG, '0701', glicn($aref), (0,0),
>> '', $XML_File, 1,0,1);
>> 		}
>> 		## check redundant regkey deletes
>> 		my $first_kname = '';
>> 		my $first_vname_exists = 0;
>> 		my $aref_first = undef;
>> 
>> 		my @regx_esc_codes = ( "\\", '/', '(', ')', '[', ']', '?', '|',
>>                                         '+', '.', '*', '$', '^', '{',
>> '}', '@' );
>
>This is invarient and should be taken outside the loop or maybe even 
>outside the subroutine.  But you don't need it at all probably.

Not true... it is not inside a loop. global scope had no use for
it.... in general, scoping in Perl is just like C++, dump it as soon
as possible !!

>
>> 		for (@regdel)
>> 		{
>> 			my $aref = $_;
>> 			next if (!(exists ($aref->[4]{$KEYNAME}) &&
>> length($aref->[4]{$KEYNAME}) > 0));
>
>Why the second loop?  Why not a do it in a single pass?
>
for alot of reasons... one is the side affects of trying to do such
a complicated maneuver all at once... generally a good 
precautionarry measure especially since the first does not
slow down the second at all, since the @regdel array of
structures has been pre-conditioned via a sort engine
that maximizes this kind of check ahead of time.
Pre-fetching like this occurs sometimes 6 levels deep
before analysis begins. Its a trade-off where clarity wins
vs.  bug introduction, but the engines must be designed
for this type of thing ahead of time... which were.

>> 			my $kname = $aref->[4]{$KEYNAME};
>> 			my $vname = '';
>> 			my $kv = 'key (branch)';
>> 			if (exists ($aref->[4]{$VALUENAME})) {
>> 				if (length($aref->[4]{$VALUENAME}) > 0) {
>> 					$vname = $aref->[4]{$VALUENAME};
>> 					# strip leading spaces
>> 					while ($vname =~ s/^ //) {}
>
>   s/^ +//;
>
>> 				}
>> 				$kv = 'value';
>> 			}
>> 			for (@regx_esc_codes)
>> 			{
>> 				my $tc = $_;
>> 				my $xx = "\$kname =~ s/\\$tc/\\\\\\$tc/g;";     # code template for
>> regex
>> 				eval $xx;
>> 				#print "$xx\n";
>> 			}
>
>Do not use eval unless there is a reason to do so.  The above is more simply
>
#--#
>for my $tc (@regx_esc_codes) {
>   $kname =~ s/(\Q$tc\E)/\\$1/g;
>}
#--#
I don't know what this is... I guess I should check it.
If you can resolve ALL the "$tc" with the "\Q"
in regx then this should work... have you tried this method yourself?
Without eval on the @regx codes you can't esc an "odd" number
of '\' without muting the '$' in "$tc". I hope it works I will try it
tommorow. @regx is array of single chars,  this won't work on
expressions as are the eval in the dynamic strings compared later.
Course thats why its done here right....
>
>But I suspect you simply wanted
>
>   $kname = quotemeta $kname;
>
>But I'm guessing you wouldn't need to do anything if you got rid of some 
>more of the pointless eval()s in your code.
>
>All in all I think you are working way too. Hard.  I'll stop now with 
>the line-by-line and go have another look at your code in its entirity. 
>  Get back to you soon.

You know, I'm being paid far too much money for it too .... hehe!!!



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

Date: Fri, 01 Apr 2005 00:41:02 -0800
From: robic0@yahoo.com
Subject: Re: Need syntax/small footprint help
Message-Id: <k62q41pbargmohm7p17d2r9dk4877e2tg2@4ax.com>

On Fri, 01 Apr 2005 00:33:32 -0800, robic0@yahoo.com wrote:

>for alot of reasons... one is the side affects of trying to do such
>a complicated maneuver all at once... generally a good 
>precautionarry measure especially since the first does not
>slow down the second at all, since the @regdel array of
i meant @details instead of @regdel
>structures has been pre-conditioned via a sort engine
>that maximizes this kind of check ahead of time.
>Pre-fetching like this occurs sometimes 6 levels deep
>before analysis begins. Its a trade-off where clarity wins
>vs.  bug introduction, but the engines must be designed
>for this type of thing ahead of time... which were.



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

Date: 1 Apr 2005 08:57:18 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Need syntax/small footprint help
Message-Id: <d2j2de$9bg$3@mamenchi.zrz.TU-Berlin.DE>

 <robic0@yahoo.com> wrote in comp.lang.perl.misc:

> return from @details empty check comes b4 @regdel population?

Please use complete English words.  Things like "b4" have been a childish
affectation since the last 300 baud modem was scrapped.

Anno


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

Date: Fri, 01 Apr 2005 01:31:40 -0800
From: robic0@yahoo.com
Subject: Re: Need syntax/small footprint help
Message-Id: <2e2q41lum1o404jb4rn73sr53269hocrh9@4ax.com>

On Mon, 28 Mar 2005 21:44:40 -0800, robic0@yahoo.com wrote:

>On Sun, 27 Mar 2005 16:27:35 +0000, Brian McCauley <nobull@mail.com>
>wrote:
>
>>
>>
>>Brian McCauley wrote:
>>
>>> All in all I think you are working way too hard.  I'll stop now with 
>>> the line-by-line and go have another look at your code in its entirity. 
>>>  Get back to you soon.
>>
>>Below find an, untested but much simpler version.  I have not changed 
>>the alorithm just removed some of the tortuous obfuscations.
>>
>>I've subsequently noticed what I presume is a flaw in the algorithm (but 
>>that's not Perl related so OT here).
>>Consider:
>>
>>  { $KEYNAME => 'foo', $VALUENAME => 'bar' }
>>  { $KEYNAME => 'foo\blab' }
>>  { $KEYNAME => 'foo\blab', $VALUENAME => 'bar' }
>>
>>I'm guessing the 3rd one above should be reported as redundant but won't be.

Since we're talking about deleting a key, the 3rd one would be
reported as the root key (2nd) is already being deleted.. check the
code.
BTW, the
      while ($vname =~ s/^ //) {} was replace with:
      $vname =~ s/^ +//;
and so the trailing spaces:
      $vname =~ s/ +$//;
although its not used in this sub. i have a reduction sub
(layer) that conditions data and takes away redudendency for
"equivalence" purposes before a typical check. Its called
"sub reduce" its got like 8 reductions now... more or less
depending on how I handle url's and directories (mixed
and across os'). u understand what I mean given these
are human typed?

>>
>>## -- checks Redundant Regkey Delete // Regkey exists --
>>sub eCHK_RegDel {
>>     my ($details) = @_;
>>     my ($first_kname,$first_vname_exists,$aref_first);
>>     for (@$details) {
>>	my $aref = $_->[0];
>>	next unless $aref->[5] eq $REGISTRY && $aref->[6] eq $DELETE;
>>	my $kname = $aref->[4]{$KEYNAME};
>>
>>	# Can input data really contain $kname='' ?
>>	# if not then the check of length($kname) is redundant.

$kname  is dynamic... again, if it exists, it MUST have value.
there is no ambiguity here... what good does existence without
value in an initialized world in the middle of life? prozac....
>>
>>	unless ( defined($kname) && length($kname) ) {
>>	    # log error
>>	    ## 0701 -- test 07,01
>>	    ReportItem ('E', $CLOGINFO, $CERRLOG, '0701', glicn($aref), (0,0),
>>			'', $XML_File, 1,0,1);
>>	    next;
>>	}
>>	my $vname = $aref->[4]{$VALUENAME};
>>
>>	# redunant surely - does input really contain $vname
>>	# with leading spaces or empty strings?

In the real world $vname contains raw human input, yes..
Unfortunately, raw spaces have length. Is a space
acceptical name on a credit card? no... so we
emulate life programitally sometimes in code to factor
out human mistakes.

>>	if ( defined $vname ) {
>>	    $vname =~ s/^ +//;
>>	    undef $vname unless length $vname;
>>	}
>>
>>	$kname .= "\\\\";
>>	unless ( $first_kname && $kname =~ /^\Q$first_kname/i ) {
>>	    # because of sort,the first non valuename
>>	    # will always be in the new keyname action
>>
>>	    $first_kname = $kname;
>>	    $aref_first = $aref;
>>	    $first_vname_exists = defined($vname);
>>	    next;
>>	}
>>	next if $first_vname_exists;
>>	ReportItem ('E', $CLOGINFO, $CERRLOG,
>>		    defined($vname) ? '0703' : '0704',
>>		    glicn($aref), glicn($aref_first), '',
>>		    $XML_File, 1,0,1);
>>     }
>>}
>>
>
>Hey man, thanks. This is just a followup test msg using Agent, lost
>the google crap, now I can see mo better.
>Yeah, you got some interresting stuff, I am going to correlate it with
>the code once I set up everything. Some stuff you overlooked,
>but some good stuff I have to check out. This is just a test
>of Agent so I just in "check" mode for that. Obvious of interrest
>is the extreme back slashing regx wise... I'll explain that too later.
>Anyway thanks for the look Brian... be back to ya !!!
>
>-RFC

OK thanks again Brian, keep up the good work.
That "\Q" thing has got me to find out at work tommorow what it is.
Thanks.
-rfc



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

Date: Fri, 01 Apr 2005 02:49:54 -0800
From: robic0@yahoo.com
Subject: Re: newbie question: display xmlfile
Message-Id: <so9q41tb4pin0veg0c5eso7p9aos5sfarl@4ax.com>

On Sat, 26 Mar 2005 16:47:24 -0600, Tad McClellan
<tadmc@augustmail.com> wrote:

>robic0@yahoo.com <robic0@yahoo.com> wrote:
>
>> not alot of interested parties will come to your
>> "lang" board.
>
>
>Bummer, since we get paid by the volume of traffic.
>
>
>(and this is not a "board", it is a "newsgroup". The dynamics
> are quite different between the 2 environments.
>)
Oke then... heres another line of bs for you pocket..




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

Date: 1 Apr 2005 03:03:46 -0800
From: kurt.semba@gmx.de (Kurt)
Subject: Re: Perl script hangs
Message-Id: <4ac4c245.0504010303.2f302630@posting.google.com>

Kurt wrote:
> I'll post again if I can define the part of the code where the error
> (hope it's a singe error source) occurs.
> 

I'm back with a short feedback like I promised. I found my error.

I had a while loop with a counter like this:

counter = 0;
while ($array[$counter])
  {
  ...
  if (some_statement)
    {
    ...
    $counter++;
    }
  }

In this short version of the code it is easy to see what happens if
the "some_statement" never evaluates to true --> endless loop. But it
was not that obvious to me in the "long" version of the code :)

Thanks for the advice with the diabling of perl's buffering, so I
could enclose the error very precisely!

Kurt


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

Date: 1 Apr 2005 01:09:05 -0800
From: "Shabbir Mala" <shabbirmala@gmail.com>
Subject: Perl User Name/Password issue
Message-Id: <1112346545.383376.13680@g14g2000cwa.googlegroups.com>

Hi All,

I need some urgent help on Net::Ftp object.

I have written a perl script file which connects to server and
downloads some files and quits. If i do a test on the test environment
with around 10 users i have no issues. But on one of the production
server something very funny is been observed. Some users after some
random numbers of proper connections, are getting a 503 login incorrect
error. This error is very random and doesnt happen in a cycle way. Say
around 10-20 proper connections once incorrect login error.

Can anybody help me on this, what could be the issue. Is there any
maximum limit allowed on the HP-UX server for FTP connections? Is it
that i am exceeding this limit and thats why i am getting this error?

Thanks and Regards,
Shabbir



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

Date: 01 Apr 2005 08:22:15 GMT
From: tadmc@augustmail.com
Subject: Posting Guidelines for comp.lang.perl.misc ($Revision: 1.5 $)
Message-Id: <424d04b7$0$25885$8b463f8a@news.nationwide.net>

Outline
   Before posting to comp.lang.perl.misc
      Must
       - Check the Perl Frequently Asked Questions (FAQ)
       - Check the other standard Perl docs (*.pod)
      Really Really Should
       - Lurk for a while before posting
       - Search a Usenet archive
      If You Like
       - Check Other Resources
   Posting to comp.lang.perl.misc
      Is there a better place to ask your question?
       - Question should be about Perl, not about the application area
      How to participate (post) in the clpmisc community
       - Carefully choose the contents of your Subject header
       - Use an effective followup style
       - Speak Perl rather than English, when possible
       - Ask perl to help you
       - Do not re-type Perl code
       - Provide enough information
       - Do not provide too much information
       - Do not post binaries, HTML, or MIME
      Social faux pas to avoid
       - Asking a Frequently Asked Question
       - Asking a question easily answered by a cursory doc search
       - Asking for emailed answers
       - Beware of saying "doesn't work"
       - Sending a "stealth" Cc copy
      Be extra cautious when you get upset
       - Count to ten before composing a followup when you are upset
       - Count to ten after composing and before posting when you are upset
-----------------------------------------------------------------

Posting Guidelines for comp.lang.perl.misc ($Revision: 1.5 $)
    This newsgroup, commonly called clpmisc, is a technical newsgroup
    intended to be used for discussion of Perl related issues (except job
    postings), whether it be comments or questions.

    As you would expect, clpmisc discussions are usually very technical in
    nature and there are conventions for conduct in technical newsgroups
    going somewhat beyond those in non-technical newsgroups.

    The article at:

        http://www.catb.org/~esr/faqs/smart-questions.html

    describes how to get answers from technical people in general.

    This article describes things that you should, and should not, do to
    increase your chances of getting an answer to your Perl question. It is
    available in POD, HTML and plain text formats at:

     http://mail.augustmail.com/~tadmc/clpmisc.shtml

    For more information about netiquette in general, see the "Netiquette
    Guidelines" at:

     http://andrew2.andrew.cmu.edu/rfc/rfc1855.html

    A note to newsgroup "regulars":

       Do not use these guidelines as a "license to flame" or other
       meanness. It is possible that a poster is unaware of things
       discussed here.  Give them the benefit of the doubt, and just
       help them learn how to post, rather than assume 

    A note about technical terms used here:

       In this document, we use words like "must" and "should" as
       they're used in technical conversation (such as you will
       encounter in this newsgroup). When we say that you *must* do
       something, we mean that if you don't do that something, then
       it's unlikely that you will benefit much from this group.
       We're not bossing you around; we're making the point without
       lots of words.

    Do *NOT* send email to the maintainer of these guidelines. It will be
    discarded unread. The guidelines belong to the newsgroup so all
    discussion should appear in the newsgroup. I am just the secretary that
    writes down the consensus of the group.

Before posting to comp.lang.perl.misc
  Must
    This section describes things that you *must* do before posting to
    clpmisc, in order to maximize your chances of getting meaningful replies
    to your inquiry and to avoid getting flamed for being lazy and trying to
    have others do your work.

    The perl distribution includes documentation that is copied to your hard
    drive when you install perl. Also installed is a program for looking
    things up in that (and other) documentation named 'perldoc'.

    You should either find out where the docs got installed on your system,
    or use perldoc to find them for you. Type "perldoc perldoc" to learn how
    to use perldoc itself. Type "perldoc perl" to start reading Perl's
    standard documentation.

    Check the Perl Frequently Asked Questions (FAQ)
        Checking the FAQ before posting is required in Big 8 newsgroups in
        general, there is nothing clpmisc-specific about this requirement.
        You are expected to do this in nearly all newsgroups.

        You can use the "-q" switch with perldoc to do a word search of the
        questions in the Perl FAQs.

    Check the other standard Perl docs (*.pod)
        The perl distribution comes with much more documentation than is
        available for most other newsgroups, so in clpmisc you should also
        see if you can find an answer in the other (non-FAQ) standard docs
        before posting.

    It is *not* required, or even expected, that you actually *read* all of
    Perl's standard docs, only that you spend a few minutes searching them
    before posting.

    Try doing a word-search in the standard docs for some words/phrases
    taken from your problem statement or from your very carefully worded
    "Subject:" header.

  Really Really Should
    This section describes things that you *really should* do before posting
    to clpmisc.

    Lurk for a while before posting
        This is very important and expected in all newsgroups. Lurking means
        to monitor a newsgroup for a period to become familiar with local
        customs. Each newsgroup has specific customs and rituals. Knowing
        these before you participate will help avoid embarrassing social
        situations. Consider yourself to be a foreigner at first!

    Search a Usenet archive
        There are tens of thousands of Perl programmers. It is very likely
        that your question has already been asked (and answered). See if you
        can find where it has already been answered.

        One such searchable archive is:

         http://groups.google.com/advanced_group_search

  If You Like
    This section describes things that you *can* do before posting to
    clpmisc.

    Check Other Resources
        You may want to check in books or on web sites to see if you can
        find the answer to your question.

        But you need to consider the source of such information: there are a
        lot of very poor Perl books and web sites, and several good ones
        too, of course.

Posting to comp.lang.perl.misc
    There can be 200 messages in clpmisc in a single day. Nobody is going to
    read every article. They must decide somehow which articles they are
    going to read, and which they will skip.

    Your post is in competition with 199 other posts. You need to "win"
    before a person who can help you will even read your question.

    These sections describe how you can help keep your article from being
    one of the "skipped" ones.

  Is there a better place to ask your question?
    Question should be about Perl, not about the application area
        It can be difficult to separate out where your problem really is,
        but you should make a conscious effort to post to the most
        applicable newsgroup. That is, after all, where you are the most
        likely to find the people who know how to answer your question.

        Being able to "partition" a problem is an essential skill for
        effectively troubleshooting programming problems. If you don't get
        that right, you end up looking for answers in the wrong places.

        It should be understood that you may not know that the root of your
        problem is not Perl-related (the two most frequent ones are CGI and
        Operating System related), so off-topic postings will happen from
        time to time. Be gracious when someone helps you find a better place
        to ask your question by pointing you to a more applicable newsgroup.

  How to participate (post) in the clpmisc community
    Carefully choose the contents of your Subject header
        You have 40 precious characters of Subject to win out and be one of
        the posts that gets read. Don't waste them. Take care while
        composing them, they are the key that opens the door to getting an
        answer.

        Spend them indicating what aspect of Perl others will find if they
        should decide to read your article.

        Do not spend them indicating "experience level" (guru, newbie...).

        Do not spend them pleading (please read, urgent, help!...).

        Do not spend them on non-Subjects (Perl question, one-word
        Subject...)

        For more information on choosing a Subject see "Choosing Good
        Subject Lines":

         http://www.cpan.org/authors/id/D/DM/DMR/subjects.post

        Part of the beauty of newsgroup dynamics, is that you can contribute
        to the community with your very first post! If your choice of
        Subject leads a fellow Perler to find the thread you are starting,
        then even asking a question helps us all.

    Use an effective followup style
        When composing a followup, quote only enough text to establish the
        context for the comments that you will add. Always indicate who
        wrote the quoted material. Never quote an entire article. Never
        quote a .signature (unless that is what you are commenting on).

        Intersperse your comments *following* each section of quoted text to
        which they relate. Unappreciated followup styles are referred to as
        "top-posting", "Jeopardy" (because the answer comes before the
        question), or "TOFU" (Text Over, Fullquote Under).

        Reversing the chronology of the dialog makes it much harder to
        understand (some folks won't even read it if written in that style).
        For more information on quoting style, see:

         http://web.presby.edu/~nnqadmin/nnq/nquote.html

    Speak Perl rather than English, when possible
        Perl is much more precise than natural language. Saying it in Perl
        instead will avoid misunderstanding your question or problem.

        Do not say: I have variable with "foo\tbar" in it.

        Instead say: I have $var = "foo\tbar", or I have $var = 'foo\tbar',
        or I have $var = <DATA> (and show the data line).

    Ask perl to help you
        You can ask perl itself to help you find common programming mistakes
        by doing two things: enable warnings (perldoc warnings) and enable
        "strict"ures (perldoc strict).

        You should not bother the hundreds/thousands of readers of the
        newsgroup without first seeing if a machine can help you find your
        problem. It is demeaning to be asked to do the work of a machine. It
        will annoy the readers of your article.

        You can look up any of the messages that perl might issue to find
        out what the message means and how to resolve the potential mistake
        (perldoc perldiag). If you would like perl to look them up for you,
        you can put "use diagnostics;" near the top of your program.

    Do not re-type Perl code
        Use copy/paste or your editor's "import" function rather than
        attempting to type in your code. If you make a typo you will get
        followups about your typos instead of about the question you are
        trying to get answered.

    Provide enough information
        If you do the things in this item, you will have an Extremely Good
        chance of getting people to try and help you with your problem!
        These features are a really big bonus toward your question winning
        out over all of the other posts that you are competing with.

        First make a short (less than 20-30 lines) and *complete* program
        that illustrates the problem you are having. People should be able
        to run your program by copy/pasting the code from your article. (You
        will find that doing this step very often reveals your problem
        directly. Leading to an answer much more quickly and reliably than
        posting to Usenet.)

        Describe *precisely* the input to your program. Also provide example
        input data for your program. If you need to show file input, use the
        __DATA__ token (perldata.pod) to provide the file contents inside of
        your Perl program.

        Show the output (including the verbatim text of any messages) of
        your program.

        Describe how you want the output to be different from what you are
        getting.

        If you have no idea at all of how to code up your situation, be sure
        to at least describe the 2 things that you *do* know: input and
        desired output.

    Do not provide too much information
        Do not just post your entire program for debugging. Most especially
        do not post someone *else's* entire program.

    Do not post binaries, HTML, or MIME
        clpmisc is a text only newsgroup. If you have images or binaries
        that explain your question, put them in a publically accessible
        place (like a Web server) and provide a pointer to that location. If
        you include code, cut and paste it directly in the message body.
        Don't attach anything to the message. Don't post vcards or HTML.
        Many people (and even some Usenet servers) will automatically filter
        out such messages. Many people will not be able to easily read your
        post. Plain text is something everyone can read.

  Social faux pas to avoid
    The first two below are symptoms of lots of FAQ asking here in clpmisc.
    It happens so often that folks will assume that it is happening yet
    again. If you have looked but not found, or found but didn't understand
    the docs, say so in your article.

    Asking a Frequently Asked Question
        It should be understood that you may have missed the applicable FAQ
        when you checked, which is not a big deal. But if the Frequently
        Asked Question is worded similar to your question, folks will assume
        that you did not look at all. Don't become indignant at pointers to
        the FAQ, particularly if it solves your problem.

    Asking a question easily answered by a cursory doc search
        If folks think you have not even tried the obvious step of reading
        the docs applicable to your problem, they are likely to become
        annoyed.

        If you are flamed for not checking when you *did* check, then just
        shrug it off (and take the answer that you got).

    Asking for emailed answers
        Emailed answers benefit one person. Posted answers benefit the
        entire community. If folks can take the time to answer your
        question, then you can take the time to go get the answer in the
        same place where you asked the question.

        It is OK to ask for a *copy* of the answer to be emailed, but many
        will ignore such requests anyway. If you munge your address, you
        should never expect (or ask) to get email in response to a Usenet
        post.

        Ask the question here, get the answer here (maybe).

    Beware of saying "doesn't work"
        This is a "red flag" phrase. If you find yourself writing that,
        pause and see if you can't describe what is not working without
        saying "doesn't work". That is, describe how it is not what you
        want.

    Sending a "stealth" Cc copy
        A "stealth Cc" is when you both email and post a reply without
        indicating *in the body* that you are doing so.

  Be extra cautious when you get upset
    Count to ten before composing a followup when you are upset
        This is recommended in all Usenet newsgroups. Here in clpmisc, most
        flaming sub-threads are not about any feature of Perl at all! They
        are most often for what was seen as a breach of netiquette. If you
        have lurked for a bit, then you will know what is expected and won't
        make such posts in the first place.

        But if you get upset, wait a while before writing your followup. I
        recommend waiting at least 30 minutes.

    Count to ten after composing and before posting when you are upset
        After you have written your followup, wait *another* 30 minutes
        before committing yourself by posting it. You cannot take it back
        once it has been said.

AUTHOR
    Tad McClellan <tadmc@augustmail.com> and many others on the
    comp.lang.perl.misc newsgroup.



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

Date: Fri, 01 Apr 2005 02:46:01 -0800
From: robic0@yahoo.com
Subject: Re: slicing syntax question
Message-Id: <qc9q41dgf14f0b025jkvqqdqso3lfgo3fd@4ax.com>

On 25 Mar 2005 17:47:38 GMT, xhoster@gmail.com wrote:

>"robic0@yahoo.com" <robic0@yahoo.com> wrote:
>> "I really want to use fewer lines in my code ......"
>>
>> Why is that... do you think fewer lines makes your code run more
>> effeciently.
>
>No, but it can make maintaining the code more efficient.  It I can see an
>entire logical unit of the program on the screen without have to keep
>scolling up and down, that makes things a lot easier.  Wise use of white
>space, and wise non-use of white-space, both contribute to good coding
>style.
>
>Xho

No, actually thats not true at all !! If you want to limit the
programs you write to less than a screen, you might find 
that your boss will get upset after 6 months of trying to
write a single screen of code when there should be 
10,000 lines by then ....
-rfc



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

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


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