Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > another newbie stupid question

Reply
Thread Tools

another newbie stupid question

 
 
maryellen sniffen
Guest
Posts: n/a
 
      12-31-2004
In the perldoc's, when something is double-quoted, it looks like the opening
double quote is actually 2 backticks ( ``$string" ). Is this a programming
convention that I would have learned had I gone to formal school for
computer science, or am I missing something. On my screen, double quotes
look like ths ( "$string" ).
Please educate me.
Thank You
http://www.velocityreviews.com/forums/(E-Mail Removed)


 
Reply With Quote
 
 
 
 
Anno Siegel
Guest
Posts: n/a
 
      12-31-2004
maryellen sniffen <(E-Mail Removed)> wrote in comp.lang.perl.misc:
> In the perldoc's, when something is double-quoted, it looks like the opening
> double quote is actually 2 backticks ( ``$string" ). Is this a programming
> convention that I would have learned had I gone to formal school for
> computer science, or am I missing something. On my screen, double quotes
> look like ths ( "$string" ).


Those are called "smart quotes" (google for some background). They are by
no means specific to Perl, or even to programming. The particular rendering
depends on what is available in your font -- some look better than others.

Anno
 
Reply With Quote
 
 
 
 
Lars Eighner
Guest
Posts: n/a
 
      12-31-2004
In our last episode, <cr3nh5$4m$(E-Mail Removed)-Berlin.DE>,
the lovely and talented Anno Siegel broadcast on
comp.lang.perl.misc:

> maryellen sniffen <(E-Mail Removed)> wrote in comp.lang.perl.misc:
>> In the perldoc's, when something is double-quoted, it looks like the opening
>> double quote is actually 2 backticks ( ``$string" ). Is this a programming
>> convention that I would have learned had I gone to formal school for
>> computer science, or am I missing something. On my screen, double quotes
>> look like ths ( "$string" ).


> Those are called "smart quotes" (google for some background). They are by
> no means specific to Perl, or even to programming. The particular rendering
> depends on what is available in your font -- some look better than others.



However, plain old single backticks on both sides `something`
*do* mean something special*(namely, execute the system command
something and put the output here), so beware.

--
Lars Eighner (E-Mail Removed) http://www.io.com/~eighner/
War On Terrorism: Joe McCarthy Brigade
"The decadent left in its enclaves on the coasts is not dead -- and may well
mount a fifth column." Andrew Sullivan, _The New Republic_
 
Reply With Quote
 
Anno Siegel
Guest
Posts: n/a
 
      12-31-2004
Lars Eighner <(E-Mail Removed)> wrote in comp.lang.perl.misc:
> In our last episode, <cr3nh5$4m$(E-Mail Removed)-Berlin.DE>,
> the lovely and talented Anno Siegel broadcast on
> comp.lang.perl.misc:
>
> > maryellen sniffen <(E-Mail Removed)> wrote in comp.lang.perl.misc:
> >> In the perldoc's, when something is double-quoted, it looks like the opening
> >> double quote is actually 2 backticks ( ``$string" ). Is this a programming
> >> convention that I would have learned had I gone to formal school for
> >> computer science, or am I missing something. On my screen, double quotes
> >> look like ths ( "$string" ).

>
> > Those are called "smart quotes" (google for some background). They are by
> > no means specific to Perl, or even to programming. The particular rendering
> > depends on what is available in your font -- some look better than others.

>
>
> However, plain old single backticks on both sides `something`
> *do* mean something special*(namely, execute the system command
> something and put the output here), so beware.


True in Perl code, but not in POD, where these are coming from.

Anno
 
Reply With Quote
 
Tad McClellan
Guest
Posts: n/a
 
      12-31-2004
maryellen sniffen <(E-Mail Removed)> wrote:

> Subject: another newbie stupid question



Please put the subject of your article in the Subject of your article.

Your article is not about newbie questions, it is about displaying
Perl's docs.


> In the perldoc's, when something is double-quoted, it looks like the opening
> double quote is actually 2 backticks ( ``$string" ).



It does NOT look like that in the *.pod files.

It may look like that in whatever display you are looking at
it in though. (in which case it is the displaying that is broken
rather than the docs that are broken.)

Are you talking about the output of the "perldoc" program?

Or is this on some website?


> Is this a programming
> convention that I would have learned had I gone to formal school for
> computer science,



Heavens no!

Pretty much exactly the opposite in fact. Formally schooled CS
folks are much less likely be members of Bill's cult.

I expect that what you are seeing is the effect of classic
Microsoft "embrace and extend" lockin.

In this case, I'm guessing M$'s "smart quotes" are not being
all that smart...


We can't really help you fix the display until you tell us
what display it is that needs fixing.


--
Tad McClellan SGML consulting
(E-Mail Removed) Perl programming
Fort Worth, Texas
 
Reply With Quote
 
Chris Mattern
Guest
Posts: n/a
 
      12-31-2004
Anno Siegel wrote:

> maryellen sniffen <(E-Mail Removed)> wrote in comp.lang.perl.misc:
>> In the perldoc's, when something is double-quoted, it looks like the
>> opening double quote is actually 2 backticks ( ``$string" ). Is this a
>> programming convention that I would have learned had I gone to formal
>> school for computer science, or am I missing something. On my screen,
>> double quotes look like ths ( "$string" ).

>
> Those are called "smart quotes" (google for some background). They are by
> no means specific to Perl, or even to programming. The particular
> rendering depends on what is available in your font -- some look better
> than others.
>

Since "smart quotes" are a Windows perversion, I assume this is particular
to the perldocs shipped with Active Perl. Certainly none of the perldocs
on my systems have this...thing.
--
Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"
 
Reply With Quote
 
Peter Scott
Guest
Posts: n/a
 
      12-31-2004
In article <(E-Mail Removed)>,
Tad McClellan <(E-Mail Removed)> writes:
>maryellen sniffen <(E-Mail Removed)> wrote:
>> In the perldoc's, when something is double-quoted, it looks like the opening
>> double quote is actually 2 backticks ( ``$string" ).

>
>It does NOT look like that in the *.pod files.


Opening quotes often do:

% grep \`\` *.pod | wc -l
62

However, they are paired with two single quotes (``...'') and
not a double quote (") as the poster alleged. However^2, in
many fonts it can be very difficult to distinguish '' from ".

--
Peter Scott
http://www.perldebugged.com/
*** NEW *** http://www.perlmedic.com/
 
Reply With Quote
 
Scott Bryce
Guest
Posts: n/a
 
      12-31-2004
Tad McClellan wrote:

> It may look like that in whatever display you are looking at
> it in though. (in which case it is the displaying that is broken
> rather than the docs that are broken.)


I think what is broken is the OS's method of copying "smart" quotes and
pasting them into a program that does not support smart quotes.


> In this case, I'm guessing M$'s "smart quotes" are not being
> all that smart...


Bingo!


> We can't really help you fix the display until you tell us
> what display it is that needs fixing.


I see this from time to time on websites that have content copied from
the docs.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
stupid, STUPID question! rincewind HTML 25 05-08-2009 01:07 PM
stupid question...waiting for a stupid answer Brandon McCombs Java 4 08-28-2006 06:57 PM
Another stupid newbie question Byte Python 10 02-19-2006 07:58 PM
Stupid question. Please, only stupid responders. If you're not sureif you're stupid, you probably aren't. =?ISO-8859-1?Q?R=F4g=EAr?= Computer Support 6 07-18-2005 05:11 AM
stupid stupid stupid kpg MCSE 17 11-26-2004 02:59 PM



Advertisments