in reply to brackets help


$_='Hello ( World )'; print "$1_$2" if /(\w+) \( (\w+) \)/; ^D Hello_World
Cheers,
Rupesh.

Replies are listed 'Best First'.
Re^2: brackets help
by tphyahoo (Vicar) on May 10, 2005 at 08:38 UTC
    Interesting. What is the ^d for?

    The ^d line was a syntax error on my system, winxp activestate.

      What is the ^d for?
      It's shorthand for "Control-d", or unix End-of-file character. rupesh was using perl as an interactive processor. (Type "perl" at a command prompt, enter the code, then press "Control-d"). I think windows might use CTRL-z or somesuch, but I don't actually.... care, tbh.

      davis
      Kids, you tried your hardest, and you failed miserably. The lesson is: Never try.