I am pretty sure that this:
On Monday, May 6, 2002, at 11:25 PM, William R Ward wrote:
perl -e 'for (1,2,3,4,5,6,7,8,9,10) { $_++; }'
Is the same as:
perl -e 'for (10) { $_++; }'
The list gets slammed right-to-left and only the last value is seen.
???
-Sx-
$_ = Hmmm - Is everyone taking a break from the last golf challenge?;
1lengthprint
__END__
If not, I have a question :)
Does anyone know of a good example or URL where I can find out more
or study about how to design printed reports that use Control-Break
reporting styles?
Something like:
That last line there has the } out of sequence; should be:
printf ORDER (\n%4d %-50s %3.2f %3.2f\n,
$quantity, $item, $price, $ext);
}
Oops! The problem I noticed is that the output columns won't line
up. :)
Ronald
LOL :)
You did the same thing I did - fixed
On Monday, February 18, 2002, at 11:04 AM, Ken Williams wrote:
Oh well. It's a shame $/ is not a regex, but I guess that
runtime cost of that would be a bit much.
It's planned to be a regex in Perl 6. The injudicious programmer
will wonder occasionally why his/her program is slow as
:| :} OK, so to put the others out of their (possible) misery:
Vicki writes:
if (...) {
my @item_parts = split(/\n/, $item);
printf ORDER (\n%4d %-50s %3.2f %3.2f\n,
$quantity, $item_parts[0], $price, $ext);
On Friday, February 15, 2002, at 06:47 PM, Stephen Turner wrote:
#!perl -l
use POSIX;print~~strtol pop,36
Well, I repeat my challenge. Can anyone beat Karsten's 46 without using
POSIX?
Hmm, maybe not...
I can get to 55 or so... But here is an expanded solution -
#!perl
while (DATA) {
How about:
$longest;
split /\s+/; # ... on whitespace
for $string (@_) {
$longest = $string if (length($string) = length($longest));
}
Since no one said what a string is, this should be fine. I/O is
left to the imagination of the reader :) There is a problem
however - if there are
In case anyone was as lost as I about converting from ANY base to
base 10:
See http://mtl.math.uiuc.edu/message_board/messages/289.html
Enjoy! :]
_Sx
('-Sx- IUDICIUM
//\ Have Computer -
v_/_Will Hack...
:)
On Saturday, February 9, 2002, at 12:56 AM, Dmitry Kohmanyuk
Дмитрий Кохманюк wrote:
On Fri, Feb 08, 2002 at 10:52:30PM -0500, Bill -OSX- Jones wrote:
OT: See:
http://www.google.com/programming-contest/
note that entries should be in C++, Java and Python
OT: See:
http://www.google.com/programming-contest/
:]
_Sx
('-Sx- IUDICIUM
//\ Have Computer -
v_/_Will Hack...
what is happening here?
$_ = (
(
(rand(
(16*(
(2**31)-1
)
)
)
) (8)
) ~(~0 5)
Hi :)
I was asked recently if I could write a Perl program that
would find out when the next time Christmas day would
actually be on a Sunday.
I said Maybe.
After thinking about it - very little thought actually -
I came up with a recursive `cal 12 $year` Unix/Perl
script where $year was the
Count me in :) Should we hide???
If you want to actually *solve* the Perl Review 0-0 (pg 37) Golf
Challenge, then see:
http://www.cut-the-knot.com/recurrence/word_primes.html
(The Challenge: Convert any base 36 number to base 10 equivalent;
in as few strokes as possible.)
OK, so
:)
On Monday, February 4, 2002, at 09:37 AM, Bernie Cosell wrote:
On 4 Feb 2002, at 8:19, Craig S. Cottingham wrote:
How about Perl 21?
even easy to make it any particular length, in a dozen different ways.
I believe Perl 'Go Fish' would be better -
* You find sets of solutions which
Well ...
On Monday, February 4, 2002, at 10:38 AM, Yanick wrote:
Why, oh why, do I have the feeling a Perl drinking game is
not far ahead?
I am pretty sure I would die from drinking TOO much then :/
How many strokes causes Alcohol Poisoning?
:)
_Sx
('
yes - that was not the *original* post however.
On Saturday, February 2, 2002, at 10:27 AM, Dave Hoover wrote:
--- Pradeep Sethi wrote:
Thanks but I am looking of any regexp substitution.
The original asked for efficiency.
So Michael stated he was clawing his eyes out (then I was LMAO.)
On Friday, February 1, 2002, at 01:05 AM, [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
And while writing this text, i in fact found:
$_=aeiouy;s!!\n\$|--y-!g;print evalgrep$_--c,
Wow! 49 strokes ...
More proof I am a beginner ... :(
:) I spend the better part of 4 hours
That is true - very few of us Jax.PM'ers are local :(
On Friday, February 1, 2002, at 12:45 PM, J Proctor wrote:
On the jacksonville-pm-list; Jax.PM'er J Proctor
[EMAIL PROTECTED] wrote -
I would love to OFFER my groups skills to such an event - we would
mop the floor with the other
yes, ditto, I learned a lot during the pain, er, game - oh the pain
of it all :)
On Monday, January 28, 2002, at 06:45 PM, Stephen Turner wrote:
Well, I'd just like to thank Andrew for organising this. I've had fun,
anyway.
Now I hope someone will explain Eugene's solution to us poor
Isn't there another var that is the same as STDERR ?
And can't you set $! directly, and when printed - goed to STDERR ???
???
_Sx
('-Sx- IUDICIUM
//\ Have Computer -
v_/_Will Hack...
Goed ??? LOL :)
On Sunday, January 27, 2002, at 12:34 PM, Bill -OSX- Jones wrote:
... printed - goed to STDERR ???
I meant GOES :)
_Sx
('-Sx- IUDICIUM
//\ Have Computer -
v_/_Will Hack...
On Sunday, January 27, 2002, at 12:38 PM, Evan A. Zacks wrote:
On Sun, Jan 27, 2002 at 12:34:55 PM, Bill -OSX- Jones wrote:
But look for $@ in
:)
But ... $@ Does like being assigned to :(
-Sx- :]
Sorry - Obviously I need to go to sleep :(
On Sunday, January 27, 2002, at 12:47 PM, Bill -OSX- Jones wrote:
But ... $@ Does like being assigned to :(
That should be *DOES NOT* like being assigned to...
Sorry;
-Sx-
* heading to sleep now :)
Greetings, On Sunday, January 27, 2002, at 01:28 PM, Stephen
Turner wrote:
This is another question about the golf, isn't it? We've been
asked not to
post our solutions to the list, but what is the etiquette about
asking for
help on golf-related topics while the competition is still
Greetings, On Friday, January 25, 2002, at 10:56 AM,
[EMAIL PROTECTED] wrote:
/[fF][oO][oO]/ better than /foo/i
That'd be Mr. RE Jeffrey Freidl in the Mastering RE/Owl book.
The parser
has to do less backtracking or something.
I have to disagree; while I have read the RE/Owl (I hear
Hi Bill,
The rules said don't publish solutions, there is nothing wrong with
getting help.
Please undisqualify yourself, and continue with the fun...
(btw, notice that even.pl only deals with lower case...)
Rick :)
Thx, but *I* feel I cheated :( I founded the Jax.PM group and *I*
You guys are waayyy to fast :)
Nothing interesting, as y/// doesn't extrapolate.
Where does a knuckle draggin' neanderthal go to evolve around here?
:)
_Sx
('-Sx- IUDICIUM
//\ Have Computer -
v_/_Will Hack...
I am at 119 strokes ... and it fails... I no longer have any idea
why :(
Are we allowed to ask for help???
_Sx
('-Sx- IUDICIUM
//\ Have Computer -
v_/_Will Hack...
$c = grep {/[osx]/i} @_;
Is there a better way?
_Sx
('-Sx- IUDICIUM
//\ Have Computer -
v_/_Will Hack...
I do appreciate all who reminded me about tr/// :)
It got it down to 88 on hole even.pl !
(Obviously I cannot submit as I asked for help. I hang my head in
shame.)
(I promise to speak English next time.)
_Sx
('-Sx- IUDICIUM
//\ Have Computer -
v_/_Will
??? I can ?!? :)
On Thursday, January 24, 2002, at 11:44 AM, Piers Cawley wrote:
Of course you can submit.
Thx - I'll research tr/// further, but that is not my problem - I
cannot get past even sets of vowels:
merlyn = ey = 2 -- so I am printing those a well...
Currently I am down to 74
69 strokes -
#!perl -n
next if(($.%2)||(((length)-1)%2));!((tr/aeiouy//)%2) and print$_;
#!perl -n
next if(($.%2)||(((length)-1)%2));print$_ unless((tr/aeiouy//)%2);
But ... Still prints even sets of vowels :(
-Sx-
Same results, but Cool none-the-less :)
that actually reminds me of something - Thx!
On Thursday, January 24, 2002, at 12:24 PM, Sven Neuhaus wrote:
#!perl -n
length%2y/aeiouy//%2||$.%2||print
_Sx
('-Sx- IUDICIUM
//\ Have Computer -
v_/_Will Hack...
Hey :)
Don't feel bad - I just seen:
# 37 strokes ...
#!perl -n
length%2y/aeiouy//%2||$.%2||print
Same results as mine even, but twice as short!
!!!/Sx :]
On Thursday, January 24, 2002, at 12:32 PM, Jason Purdy wrote:
I'm not sure if I like the present, though ... I'm a beginner
and
Now I know I am stew-pid :(
On Thursday, January 24, 2002, at 01:33 PM, Bill -OSX- Jones wrote:
santa
ODD length ... duh!
-Sx-
PS - OK, I am going away for another couple years ...
my new line looks like:
#!perl -n
and it works even though my perl is /usr/local/bin/perl
On Thursday, January 24, 2002, at 04:24 PM, Sean McAfee wrote:
I just realized I was being unfairly penalized by this line because my
hash-bang line looks like this:
#!/some/path/perl5/bin/perl
36 matches
Mail list logo