Thread: SPacing in PERL

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Posts
    3
    Rep Power
    0

    SPacing in PERL


    Hello, new to this forums and hoping to learn a lot!

    I am trying to add a blank space to a variable in PERL, see code below between the 2 hash tags:
    [+PROFILE('CASH_BALANCE','0','# ###')+]

    Problem is, when i run the script (btw this is for an email i am developing) the platform I am using, EPSILSON DREAM email tool, is not rendering the space, so the result looks like "1000" not "1 000"

    Any idea of how I can accomplish this? Sorry for my lack of technical knowledge here, new to PERL.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Apr 2009
    Posts
    1,875
    Rep Power
    1225
    That's not valid perl code.

    Please post your real perl code and provide more details on what you need to accomplish.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Posts
    3
    Rep Power
    0
    Thanks for the quick reply, as for if its valid or not im not sure, i'll go by what you say but this is code that this company i work for has used for years.

    What i am trying to accomplish is this:
    [+PROFILE('CASH_BALANCE','0','# ###')+]

    Thi is an HTML email that I deploy through an online email tool called DREAM.
    +PROFILE - is referencing teh mail PROFILE data set
    'CASH_BALANCE' - is a numeric value being dynamically pulled into the email, resides in teh PROFILE list from above.
    '0' - is the default value to display in case there is no "CASH_BALANCE
    '# ###' - is the numeric format I would like the CASH_BALANCE to render in, "1 000" or "4 344".

    The results i am getting are "1000" or "4344", i NEED the space before the first and second digit if the value is in the thousands.

    I HOPE this was a little better an explaining my situation.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Apr 2009
    Posts
    1,875
    Rep Power
    1225
    Based on the info you've give, your question doesn't have anything to do with Perl programming.

    Have you checked for any forums dealing with your "DREAM" tool?
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Posts
    3
    Rep Power
    0
    Originally Posted by FishMonger
    Based on the info you've give, your question doesn't have anything to do with Perl programming.

    Have you checked for any forums dealing with your "DREAM" tool?
    So your saying [+PROFILE('CASH_BALANCE','0','# ###')+] isn't PERL script?
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Apr 2009
    Posts
    1,875
    Rep Power
    1225
    That is correct. It is not perl code.

    However, it is possible for a perl script to use that in some manner, but you'll need to show the surrounding code so I can see the context of its usage.

    I suspect that it's part of a template used by your "DREAM" tool. That tool could be using perl to parse/fill that template.
    Last edited by FishMonger; August 27th, 2013 at 11:05 AM.

IMN logo majestic logo threadwatch logo seochat tools logo