Follow Slashdot blog updates by subscribing to our blog RSS feed


Forgot your password?
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 Internet speed test! ×
User Journal

Journal Journal: A Perl Lesson for the Day 1

If you have a block of quoted text inside the single-quoting operator q(), a backslash preceding a '(' or ')' (or whatever delimiter characters you have chosen for q()), will be parsed as an escape on that delimiter character. Therefore, you must escape any literal backslash if it appears before '(' or ')'.


#!/usr/bin/perl -w
print q(
This is a test... x(1), x\(2\), x\[3\], x\\(4\\).

The rationale for this undocumented Perl feature is reasonable. The q() operator will ignore balanced pairs of delimiter characters that appear in the enclosed text, but it is sometimes necessary to write text that contains unbalanced delimiters. To make that possible, the q() operator must recognize the escape on its delimiters.

User Journal

Journal Journal: Shiner B.A.S.H 1

Completed my longest ride to date: 93.8 miles,
from Katy to Shiner in exactly 6 hours,
including rest stops. Ride time was 5:10,
avg. speed 18.2 mph.

Weather turned out to be perfect, after a week
of thunderstorms. Most riders were charged up
and in high spirits with the sudden improvement
in the weather. A light breeze out of the north
neither helped nor hindered the westbound riders.

The course was good, except for a 4-mile stretch
west of Wallis where the pavement had been
removed; in other words, GRAVEL. I'm glad that
I had installed Gatorskins last week; a lot of
riders got flats in that stretch. The course
was mostly flat for the first 60 miles, then
turned into rolling hills for the last 33 miles.
Nothing too tough; I stayed in the saddle and
simply downshifted. Never had to use the granny

The post-ride event was rather disappointing.
Free beer, but no place to sit and no shade.
By noon, the temperature had climbed into the
80's, the air was still humid from the previous
days' rainfall and, off the bike, there was
very little breeze. Next year, it would be
nice to have our own tent and chairs (if I
can talk the wife into bringing them).

Slashdot Top Deals

Prototype designs always work. -- Don Vonada