Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: pearl script working but is changing to attachment

by johngg (Canon)
on Feb 16, 2018 at 15:24 UTC ( #1209309=note: print w/replies, xml ) Need Help??

in reply to pearl script working but is changing to attachment

To expand on AnomalousMonk's reply, which should save you a heap of typing in the future, HEREDOCs interpolate by default and double quotes do not need to be escaped. Neither do you need explicit line terminators. Note also that, unless you have used select to nominate a different filehandle, STDOUT is the default handle for output and does not need to be supplied to print. To stop interpolation do print <<'EOT'; instead, look at the documentation for more.

This script

use strict; use warnings; my $your_email_address = q{}; my $your_name = q{Fred Bloggs}; print <<EOT; <input type="hidden" name="your_email_address" value="$your_email_addr +ess"> <input type="hidden" name="your_name" value="$your_name"> EOT

Produces this output

<input type="hidden" name="your_email_address" value="fred.bloggs@wort"> <input type="hidden" name="your_name" value="Fred Bloggs">

I hope this is helpful.



Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1209309]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (11)
As of 2019-02-19 19:38 GMT
Find Nodes?
    Voting Booth?
    I use postfix dereferencing ...

    Results (105 votes). Check out past polls.

    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!