Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Re: Re: FMTYEWTK about split //

by ambrus (Abbot)
on Jan 21, 2004 at 14:41 UTC ( #322898=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: FMTYEWTK about split //
in thread FMTYEWTK about split //

I thought that for (split //, $string) { would cost a lot of memory if $string is long, but now I'm not sure.


Comment on Re: Re: Re: FMTYEWTK about split //
Download Code
Replies are listed 'Best First'.
Re^4: FMTYEWTK about split //
by hardburn (Abbot) on Jan 21, 2004 at 14:47 UTC

    It will cost a lot of memory. Fortunately, $string is rarely large. And if it is large, the regex-iterator solution will probably be slow. You'll probably be better off with a substr solution on large strings.

    ----
    I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
    -- Schemer

    : () { :|:& };:

    Note: All code is untested, unless otherwise stated

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (16)
As of 2015-07-30 16:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls