| jagerman | PERL? |
| michoelc | I have two files, main app, and my module. My module has a function to print out messages, but I want to add something depending on a variable in the main program |
| harDharHar | free lifetime support for all users |
| j_ | I can't found docs about object collections, can anyone help please? |
| jagerman | Whose life? |
| harDharHar | customers lol |
| jonsmith1982 | cloud cuckoo land |
| phroggy | michoelc: you can pass that variable to the function every time the function is called... |
| harDharHar | I got a turtle head but I'm not heading to the mens room for about 30min |
| Turtle_Head | sweet pain |
| pianoboy3333 | I have a regex, s/ /_/, but how do I make it replace all of the spaces in the variable? |
| phroggy | michoelc: or if you're sure this is what you want, if the variable in your main program is global (declared with "our $varname") you can refer to it from within your module as "$main::varname" |
| jagerman | With a g |
| pianoboy3333 | thank you so s/ /_/g ? |
| hobbs | tr/ /_/ # win |
| jonsmith1982 | s/\s{1,}//; |
| czth_ | and by {1,} you mean + |
| jagerman | y/ /_/ # winner. Saves 1 byte of code. |
| michoelc | phroggy, that sounds like what I want.. the function paramenter wont work in my case |
| jonsmith1982 | i'm used to doing that way |
| phroggy | michoelc: why not? |
| hobbs | PARAMINTIER |
| dazjorz | Hey |
| Chris62vw | hi |
| dazjorz | Hopefully Term::Menu 0.07 went up okay ? :) |
| michoelc | phroggy, it's hard for me to explain it.. I will try. I have a hash called %commands, each entry has a command with a function address, and a description |
| dazjorz | I did two updates on one day after not looking at the module for a year or so |
| michoelc | phroggy, then a function called doCommand, which calls the right function |
| Chris62vw | dazjorz, not sure, check cpan |
| czth_ | Term::Life::Insurance |
| michoelc | phroggy, and a function called printHelp which prints the help message |
| Chris62vw | haha |
| michoelc | phroggy, problem is that the descriptions in the hash vary depending on the variable in the main program (it's the name of the program) |
| jonsmith1982 | how do you repeat a pattern in a regex? /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/ |
| czth_ | (\d{1,3}\.){3} and then the last one of course |
| jonsmith1982 | cool thanks :) |