is possible.
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
Michael G Schwern [EMAIL PROTECTED] wrote:
Schuyler's got it down to:
perl -ne
'(/^\\s*[^#]|^\\s*#\\s*(include|define|(ifn?|un)def|else|elif|endif)/)print'
That leaves comment lines when there's whitespace before the #.
And why the parens around the regex?
--
Keith C. Ivey [EMAIL
the syntax of cpp commands?
#define
If we're not cheating at all, the program has to be a LOT
longer.
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
interested only in golf, and don't care about those
issues, you can eliminate several bytes easily:
$str=~s/[^ -~]/sprintf'\%03o',ord$/ge;
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
was testing. There's the same problem
with \t, \f, and \r (ASCII 9, 12, and 13). Perl seems to
think that anything that matches \s is printable, rather than
just space.
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
' parameter:
http://groups.google.com/groups?th=d8f2e19fb2209276
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
there just annoys a completely innocent person who's
no doubt getting quite enough complaints from ignorant victims
of the spammer.
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
don't use a Perl array to do it?
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
--- Keith C Ivey - 22
#! /usr/bin/perl -lp
}{$_=7e10+$.,s$.$$
Looks like I was the only one who didn't use printf on this
hole (other than Piers, but using $# is similar), and I was
only one stroke short of the winners.
I'm surprised no one submitted anything with 0 x10
*?)#.*|(\S+))\s*/$+:/g,s/:+$/\n/
It still has the problems with trailing null fields and xx.
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
;print/.{1,127}/g
But s'\x0\xff' @' to make it shorter and more visible on my system.
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
no explanation for my not changing 'tr' to 'y' (or for
that matter not removing the 'x' in '\x0'). I hang my head in
shame.
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
at the beginning of the second line, and then
did it again in your message. There should be only one dot
there.
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
of characters between the
{ and the }?
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
representation
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
Jerome Quelin [EMAIL PROTECTED] wrote:
I remember you the fixed rules:
- Number is to be taken as first arg of the script.
- You can assume input as [0-9A-Z] (ie, no lowercase).
ASCII? Or do the solutions have to work for EBCDIC as well?
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
happy
with my own, standard indenting style, I see no reason to
change. But we're venturing into unfun territory.
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
in the 1880s.
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
(not just its
origin) Scottish, since there was no indication of what the
corresponding term would be in the English of England. But
perhaps English people didn't talk about golf in the 1880s.
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
of
obsession to go.
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
Stephen Turner [EMAIL PROTECTED] wrote:
Funny, I thought I'd had several epiphanies, and yet I'm still a
stroke behind you...
I apologize for my unseemly whining. I've been punished for it
by being dropped from 7th to 11th place overnight.
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
, but then I saw that s/\B./$$/g didn't work
as expected either.
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
warrants the creation of
[EMAIL PROTECTED]
Sounds reasonable, although I'd hope it wouldn't cause too much
withering of FWP.
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
PROTECTED] a week or so ago.
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
You can further combine the above options, each combination
producing a different camel, for example:
perl camel.pl uri
which produces a large, bearded camel with a ponytail, glasses,
and a tie-dyed T-shirt.
--
Keith C. Ivey [EMAIL PROTECTED
WC -Sx- Jones [EMAIL PROTECTED] wrote:
Given: fcjjf1CkQsV1IFCCJ25145245
Can you devise a way to break the code?
Clearly the encryption is a simple xor with
\x2c\x16\x19\x1e\x46\x50\x2d\x04\x25\x1b\x33\x43 .
\x69\x16\x26\x31\x26\x12\x5d\x50\x57\x5e\x57\x46\x19.
--
Keith C. Ivey [EMAIL
Yitzchak Scott-Thoennes [EMAIL PROTECTED] wrote:
Only if you say $x eq means no lines instead of one empty
line missing its \n :)
Well, the subject line does say textfile-like, and a 0-byte
text file has no lines, not one empty line.
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
I made the copy inside the loop, that seems to have been just
an oversight. I didn't use \b in the matches, but FONT and B
were really the only HTML tags that occurred in the fragments
I was dealing with.
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
to read and process
| it. I've even gone to the length of writing a prefilter to
| glue together tags that got split across multiple lines,
| just so I could do the regexp trick.
http://www.tbray.org/ongoing/When/200x/2003/03/16/XML-Prog
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
.
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
Randal L. Schwartz [EMAIL PROTECTED] wrote:
perl -ne 'print unless 1..5'
perl -pe '$_ x=!(1..5)'
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
occasionally once you've gotten used to it.
--
Keith C. Ivey [EMAIL PROTECTED]
Washington, DC
32 matches
Mail list logo