#perl - Tue 27 Mar 2007 between 18:30 and 18:36



jagermanPERL?
michoelcI 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
harDharHarfree lifetime support for all users
j_I can't found docs about object collections, can anyone help please?
jagermanWhose life?
harDharHarcustomers
lol
jonsmith1982cloud cuckoo land
phroggymichoelc: you can pass that variable to the function every time the function is called...
harDharHarI got a turtle head but I'm not heading to the mens room for about 30min
Turtle_Headsweet pain
pianoboy3333I have a regex, s/ /_/, but how do I make it replace all of the spaces in the variable?
phroggymichoelc: 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"
jagermanWith a g
pianoboy3333thank you
so s/ /_/g ?
hobbstr/ /_/ # win
jonsmith1982s/\s{1,}//;
czth_and by {1,} you mean +
jagermany/ /_/ # winner. Saves 1 byte of code.
michoelcphroggy, that sounds like what I want.. the function paramenter wont work in my case
jonsmith1982i'm used to doing that way
phroggymichoelc: why not?
hobbsPARAMINTIER
dazjorzHey
Chris62vwhi
dazjorzHopefully Term::Menu 0.07 went up okay ?
:)
michoelcphroggy, 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
dazjorzI did two updates on one day after not looking at the module for a year or so
michoelcphroggy, then a function called doCommand, which calls the right function
Chris62vwdazjorz, not sure, check cpan
czth_Term::Life::Insurance
michoelcphroggy, and a function called printHelp which prints the help message
Chris62vwhaha
michoelcphroggy, problem is that the descriptions in the hash vary depending on the variable in the main program (it's the name of the program)
jonsmith1982how 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
jonsmith1982cool thanks :)

Page: 2 9 16 23 30 37 44 51 58 65 72 79 86 93 100 107 114 

IrcArchive