http://www.perlmonks.org?node_id=295644


in reply to Why will v-strings be deprecated

I've picked up on other people using $/ to avoid quoting difficulties.   It can be a problem getting the quoting right on Win command lines.   Using
    perl -e "print 'Hello World!',$/"
works nicely.

Replies are listed 'Best First'.
Re: Re: Why will v-strings be deprecated
by BrowserUk (Pope) on Oct 01, 2003 at 14:53 UTC

    Even easier:)

    perl -le "print 'Hello World!'"

    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
    If I understand your problem, I can solve it! Of course, the same can be said for you.

      Easiest (assuming you have more than one output statement in your script):

      # THIS use feature 'say'; # OR use 5.10.0; # THEN say 'Hello, World!';

      Perl6::Say fails Build test, at least for me.

      Note: Contents may change.

        Actually, I still find -l easier. But back in 2003, 5.10 was still nothing more than a twinkle in its fathers eyes.

Re: Re: Why will v-strings be deprecated
by ambrus (Abbot) on Oct 06, 2003 at 14:35 UTC
    This is a good trick, I wouldn't have tought of it. I knew about perl -le.