Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: How to replace spaces with different chars?

by LanX (Saint)
on Jul 07, 2022 at 14:15 UTC ( [id://11145333]=note: print w/replies, xml ) Need Help??


in reply to Re: How to replace spaces with different chars?
in thread How to replace spaces with different chars?

why not use

my @matches = glob($datum)

or

my @matches = <$datum>

directly?

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^3: How to replace spaces with different chars?
by kcott (Archbishop) on Jul 07, 2022 at 14:46 UTC

    This was a follow-up to my previous post about system, which has:

    "This is not what you want to use to capture the output from a command; for that you should use merely backticks or qx//, ..."

    Of course, TMTOWTDI. :-)

    — Ken

        "Sorry, I have to disagree."

        Do you? What precisely are you disagreeing with? Please provide a full, verbatim quote of anything I wrote that you disagree with.

        The facts:

        • The OP asked how system could be used.
        • I provided an example in answer to this.
        • I followed this up with a further example contrasting system(...) (no capture of command output), with `...` (capture of command output possible), in accordance with the system documentation.

        You seem to have concocted the idea that I recommended shelling out and, on the basis of that fictitious notion, decided that the appropriate action was to educate me.

        My reference to TMTOWTDI, including a smiley, was simply a nod to the fact that other (better) ways were possible. I've no idea where your modified definition originated; I suggest you follow the link and read:

        "This doesn’t mean that more ways are always better or that all possible paths are equally desirable ..."

        There's certainly no reference to your:

        "TMTOWTDI only covers this, if there is a good reason."

        — Ken

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2024-04-24 22:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found