Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: multiple commands before unless ?

by emilford (Friar)
on Jun 26, 2003 at 16:23 UTC ( [id://269293]=note: print w/replies, xml ) Need Help??


in reply to multiple commands before unless ?

By the way, not many have commented on the other question. Is the way I'm doing this a good approach as far as using the map function to swap out the line I am looking for in the file? I know this can be done in quite a few different ways, but I want to limit the operations used. Also, no modules! Thanks.

Replies are listed 'Best First'.
Re: Re: multiple commands before unless ?
by tilly (Archbishop) on Jun 26, 2003 at 19:06 UTC
    Saying "No modules" in this crowd is like waving a red flag at a bull.

    But that said, I would solve your original problem using the options in perlrun. For instance:

    perl -pi.bak -e 's/^update_info=(?:\w+)/update_info=auto/' your_file
    (Switch quotes to " for Windows.)
Re^2: multiple commands before unless ?
by adrianh (Chancellor) on Jun 26, 2003 at 19:02 UTC
    Also, no modules!

    Why?

      I know modules are usually the way to go. I use modules for my own projects. I asked for a no-module solution because I'm not sure what modules are going to be installed on the systems that I work on. Things are very locked down, so I wouldn't be surprised if we were working on a less than standard build. If I had control over what modules were installed, than I'd be more than willing to use some of the mentioned modules.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2024-04-25 08:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found