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

Re^2: changing the path name to unix style.

by jesuashok (Curate)
on Dec 13, 2006 at 07:42 UTC ( [id://589510]=note: print w/replies, xml ) Need Help??


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 threshold of quality. You may see it by logging in.

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).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-04-24 06:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found