in reply to Re: changing the path name to unix style.
in thread changing the path name to unix style.

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re^3: changing the path name to unix style.
by apotheon (Deacon) on Dec 13, 2006 at 08:20 UTC

    In simple terms, if you quote your regex, it ceases to be a regex and becomes a non-interpolated string instead. If that doesn't make sense to you, I recommend you read perlintro, as the anonymous monk suggested. It's pretty clear you're missing some very fundamental understanding of very basic concepts in Perl.

    Another option for trying to figure out what's going on is reading the quotes in Perl tutorial (written by yours truly a couple years ago).

    You might also consider purchasing or borrowing a copy of the book Learning Perl and reading the first few chapters.

    print substr("Just another Perl hacker", 0, -2);
    - apotheon
    CopyWrite Chad Perrin

Re^3: changing the path name to unix style.
by Anonymous Monk on Dec 13, 2006 at 08:13 UTC
    Why the 2nd one did not work ? only difference is "'".
    ?!?!
    print 'string';
    You desperately need to read perlintro.
Re^3: changing the path name to unix style.
by tinita (Parson) on Dec 13, 2006 at 18:45 UTC
    Why the 2nd one did not work ? only difference is "'".
    i can hammer in nails with a hammer. why does it not work if i draw a hammer onto a piece of paper and hammer using that paper?
    SCNR =)
Re^3: changing the path name to unix style.
by ikegami (Patriarch) on Dec 13, 2006 at 17:15 UTC
    For the same reason print '4 + 5' doesn't print 9. It makes no sense for Perl to treat string literals as code (unless explicitely told to using eval).