Re: how to assign to var in module from script

From: John Bokma (postmaster_at_castleamber.com)
Date: 06/11/04


Date: Thu, 10 Jun 2004 21:08:55 -0500

Bob wrote:

> "John Bokma" <postmaster@castleamber.com> wrote in message
>
>>So you are lazy?
>
> no I am simply not _trying_ to learn perl okay? I just had the 1
> question... no need for a lecture..I used to use it, but then I moved on to
> other things okay...

And you forgot all about perldoc?

>>>>>do you know me?
>>>>
>>>>No, which I consider to be good ;-)
>>>
>>>why?
>>
>>I read a lot between the lines. OTOH maybe you are a nice guy. People
>>are different on Usenet than in real life.
>
> no I am the same in real life...if someone gives me attitude when I am
> simply asking a question...out loud..not even to anyone in specific...then I
> feel I have to contest...I feel like, "if you don't have something nice to
> say, stfu" didn't your mom ever tell you that?

I never heard my mom say stfu :-D But you are really tempting her ;-)

>>"package myvartest;"
>>
>>made me (and I guess not only me) assume you did write this module.
>>So... this means you made up the code in your post? That is always a bad
>>idea.
>
> I was trying to simplify it for you...I think the module is like 13k+....

Ah, in that case it is always wise to say that, and also what the
restrictions are.

> all I needed to know was "how to assign to var in module from script" ...you

"There's More Than One Way To Do It".

I prefer using a set function.

> know... kind of like the title of my post?? did you skip that part? how am

No, as you could have seen.

> I assigning to it from my script if I only pass a value to a function in a
> module....the actual assigning is done inside the module then...let me be
> frank...R.T.F. title of the post okay??

how to assign to var *in* module from script

With my solution the assignment happens *in* the module, as you
requested. The function makes it possible to do it *from* your script.

>>And you should have stated that in your original post.
>
> read the title and body of my post...it says nothing about passing variables
> to a function inside a module.

You wanted it *in* your module :-D.

>>Without the ? it's a bit hard, but can you please point to this
>>restriction? The module you posted looked like some test stuff, written
>>by a beginner, not some 3rd party module you can not change.
>
> please read the title of the question again...untill you get it...but
> really..you thought that was a real module...no, that was a test...in case
> you didn't know, that module wasn't really usefull, cause it isn't even as
> good as print;

You made it :-D. I assumed you were writing your first module ;-)

> the snippet was that simple though almost exactly like what I posted....I am
> still not posting it, because you have to have un/pw to get it, but it just
> declared 4 global vars and then did stuff that was outside the snippet.
> maybe I should have put #for debug purposes after sub checkit() then it
> would have been more clear...but is that what you keep posting back about?

I hope you teach you how to write clearer questions next time ;-)

>>Not "hey, I have a module I can not change, it looks a bit like this
>>piece of code etc.". Write clear questions if you want correct answers.
>
> look, like I said .. I got my answer someplace else...the first post was
> what $obj::var="foo";
> and if you don't believe me, I don't care, but I am also not posting where I
> got the answer, cause that is "my backyard" a little...but I don't post like
> 11k post there by any stretch.

Maybe the module is available on line? You can provide a link. Or make
it available on line. However, in this case you could have written your
question like: I have a module I am not allowed to modify, and it has a
variable, how can I access it?.

> yeah...but your assumptions were wrong in this case...maybe you should ask
> more questions before you come off so tough.

You want help, not I :-D.

[ snip snip snip ]

>>Providing solutions is my job, yes.
>
> what and you do this for fun?!? have you ever heard of s&m I think you
> might like the m part.

Look up the definition of the m part and compare it to the s part ;-)

-- 
John                               MexIT: http://johnbokma.com/mexit/
                            personal page:       http://johnbokma.com/
    Experienced Perl programmer available:     http://castleamber.com/
             Happy Customers: http://castleamber.com/testimonials.html


Relevant Pages

  • Re: where are linux developers guidelines/rules kept ?
    ... don't start a new thread every time you reply to a posting. ... Let's hire aliens to create the system, ... The principles ARE the specifics. ... Okay, here is the answer to your entire query: ...
    (comp.os.linux.misc)
  • Re: Unexpected disconnect
    ... although it's okay in this case, it's generally a bad idea to add ... This posting is provided "AS IS" with no warranties, ... I was able to "fix" the problem by going back to a system ... I tested the router connection with a new router and am ...
    (microsoft.public.windows.mediacenter)
  • Time for a return?
    ... Like most of the one time regulars here, I have not been posting ... (okay, Dodgy, spell it your own way). ... Brian survived culture may yet be revived! ... businesses going bust for lack of customers, we have a high street ...
    (uk.local.essx)
  • Re: Mike Farrell
    ... >> things that he is very upright and logical about and the issues he tends to ... If it's okay for him to do it, ... I've been posting here for years and I've never heard of you. ... Mez ...
    (alt.true-crime)
  • Re: Psi Test Reveal
    ... >Okay; finally got some time and some rest, ... >do before posting the Test, so I wasn't really fishing for free ... >and coming up with the idea of posting the good news as a Psi ... >one's psi abilities, and it seemed a useful thing to do. ...
    (uk.religion.pagan)