Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: RFC: new module r (or R)

by samtregar (Abbot)
on Mar 05, 2004 at 18:26 UTC ( #334308=note: print w/ replies, xml ) Need Help??

in reply to RFC: new module r (or R)

This sounds useful, but I think I'd prefer it packaged as a script. My reasoning is that modules are for reusable code on a large scale, but scripts are the right size for small-scale reusability like this.

Maybe call it 'pgrep'? Or 'prep'?


Comment on Re: RFC: new module r (or R)
Replies are listed 'Best First'.
Re: Re: RFC: new module r (or R)
by etcshadow (Priest) on Mar 05, 2004 at 18:45 UTC
    Well, the reason that I'd want to use it as a module (really, even, making it a module is just an end-around run at making it a command line option to the perl interpretter), is because you could use it for anything that puts files on the command line.

    The thing about making it a script is that, sure, you can use it to work like grep... but greping files is just the beginning of the potential for this. Any command or script you have that expects files in @ARGV could benefit from this. I know that I, myself, do a lot of stuff that fits that bill.

    Imagine, for example, some script perl [file1] [file2] ..., (whatever might be): wouldn't it be nice to be able to say: "perl -mr *"? Or, for that matter, since it is a module, you could incorporate it into, activated by a "-r " switch.

    ------------ :Wq Not an editor command: Wq

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (12)
As of 2015-09-02 12:50 GMT
Find Nodes?
    Voting Booth?

    My preferred temperature scale is:

    Results (80 votes), past polls