Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Re: Concordance Generator

by sifukurt (Hermit)
on Aug 15, 2001 at 01:33 UTC ( [id://104887]=note: print w/replies, xml ) Need Help??


in reply to Re: Concordance Generator
in thread Concordance Generator

I re-posted the code using most of the suggestions. With regard to the version thing, I primarily include a version number for my own use, I wasn't trying to adhere to a standard. I didn't even know that there was a standard, to be honest. The sort block was a remnant from when I was going to try to keep the case of the words, rather than converting everything to lower case. I was going to do sort { lc($a) cmp lc($b) }, but ended up dropping the idea cuz it was getting too messy. (Dang, I had a remnant thing in my Fibonacci generator, too. Sorry 'bout that.)

I tried to use your code for creating the list of line numbers, but I kept getting a trailing comma with the output. Any suggestions on that?
___________________
Kurt

Replies are listed 'Best First'.
Re: Re: Re: Concordance Generator
by John M. Dlugosz (Monsignor) on Aug 15, 2001 at 01:48 UTC
    I tried to use your code for creating the list of line numbers, but I kept getting a trailing comma with the output. Any suggestions on that?

    Easy: given $x is a list ref (stored as a hash element in the real program), say print join (',',@$x);

    re $VERSION, yea, it's a standard. You found the node on it? Short version for those just tuning in: you can specify a required version number when loading a module and it dies if the module found is too old.

    re preserving case but sorting case insensitive: look up the Swartzian Transform (spelling something like that).

    I'll go over your code again later tonight, perhaps.

    Keep it up!

    —John

Log In?
Username:
Password:

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

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

    No recent polls found