Hi, i realize that this doesn't have to do with perl -exactly-, but it does in the long run, and quite frankly i didn't know where else to ask.
i have two perl written cgi scripts, on seperate servers. one is a shopping cart, the other is a logging mechanism; and it seems the shopping cart's values aren't very compatible with mine.
it will let me use an 'embedded' variable for the total price (FINAL_SUBTOTAL), but places spaces and other garbage within the result.
eg. $ 4.95, as opposed to 4.95 which is what i need.
now, what i did was make a kludgy workaround, because i'm on a limited timeframe (working and all (: ), so i used some javascript on the shopping carts thankyou page to implement JS's weird but mildly effective regex functions, and got this:
<script language="javascript"> var re = /([^\d\.]+)/g; var str = "FINAL_SUBTOTAL"; var newstr = str.replace(re, ""); </script>

now, the main problem is getting my newly regexed variable to show up in a URL (eg.  <img src="http://somedomain/cgi-bin/some.cgi?newstr">)
or something like that. and just to be clear, for reference sake alone, i'll post a perlish version of this stupid JS later on. (:
please dont flame me, i would've patched the other perl script had i been given the time, but a deadline is a deadline.

strfry

In reply to making perl scripts play nicely together by strfry()

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.