flieckster has asked for the wisdom of the Perl Monks concerning the following question:

hi there. is there any way to print the "$" to a php file?
<?php $client_aero = 'Aeropostale'; $aero_total = '72'; $aero_average = '70'; ?>

Replies are listed 'Best First'.
Re: printing "$" to php file
by NetWallah (Canon) on Jan 30, 2018 at 18:54 UTC
    use strict; use warnings; print <<'_PHP1_'; <?php $client_aero = 'Aeropostale'; $aero_total = '72'; $aero_average = '70'; ?> _PHP1_ # Alternative using double quotes # Use this if you want to send perl variables to PHP my ($perl_client, $perl_total, $perl_avg) = ('Aeropostale',72,70); print <<"_PHP2_"; <?php \$client_aero = '$perl_client'; \$aero_total = '$perl_total'; \$aero_average = '$perl_avg'; ?> _PHP2_ exit 0;

                    Is a computer language with goto's totally Wirth-less?

      Hello NetWallah,

      I had no idea that he was referring for the actual character $ I though that he was referring to Perl Special Variables Quick Reference. It is nice that you where able to understand what he meant. :)

      BR / Thanos

      Seeking for Perl wisdom...on the process of learning...not there...yet!
        Oh boy, that was easy. the \ was backwards in my code! opps!
Re: printing "$" to php file
by thanos1983 (Parson) on Jan 30, 2018 at 17:50 UTC