Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I fix my malfunctioning transliteration?

Status
Not open for further replies.

mtorbin

Technical User
Nov 5, 2002
369
US
Hey all,

I wrote the following transliteration:

$fullUnit =~ tr/ /%20/;

However, the %20 always gets turned into $. Any ideas why?

- MT
 
Is that twenty for space or two-OH, as in OHIO?

Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Duncan,

Thanks. On that same note, I'm having the WORST problem with this portion of code:

print "<body onLoad=delayDownload(\"$fileName\")>";

It's creating this (if you were to view the source):

<body onLoad=delayDownload("Internal dscrp to FIX RM.xls)>

As you can imagine, JS is screaming at me about the missing " but I can't seem to get it to recognize the one I've escaped.

Any ideas?

- MT
 
a shot in the dark... have you chomped $fileName ?

and what happens if you print "--" . $fileName . "--";


Kind Regards
Duncan
 
print "<body onLoad=delayDownload('$fileName')>";

Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Now see, I tried all of that, but perl vomitted it back. Here is the solution I finally found that produces NO errors with JS or Perl:

print qq(<body onLoad="delayDownload('$fileName')">);

Thanks guys and gals!

- MT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top