Re: Error: can't modify scalar reference

Discussion in 'Perl' started by nobull@mail.com, Aug 18, 2003.

  1. Guest

    (HP) wrote in message news:<>...
    >
    > When i run my following prog.
    >
    > our $test='this is just test';
    > print $test;
    > print "----test\n";
    >
    > it gives me compilation error: can't modify scalar reference at line 1


    Works fine for me.

    Anyhow are you sure that's the full message - it doen't look like one
    I'm familiar with. Perl usually says

    can't modify <whatever> in <whatever> at <whereever>

    > but if i changed "our" to "my" it works fine.
    >
    > Any idea?


    You probably changed something else. What happens if you change back?

    This newsgroup does not exist (see FAQ). Please do not start threads
    here.
     
    , Aug 18, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Purl Gurl
    Replies:
    0
    Views:
    896
    Purl Gurl
    Aug 18, 2003
  2. Eric Mahurin
    Replies:
    4
    Views:
    250
    David A. Black
    May 6, 2005
  3. Clint Olsen
    Replies:
    6
    Views:
    364
    Jeff 'japhy' Pinyan
    Nov 13, 2003
  4. Mark

    Replace scalar in another scalar

    Mark, Jan 27, 2005, in forum: Perl Misc
    Replies:
    4
    Views:
    168
    Arndt Jonasson
    Jan 27, 2005
  5. emrefan
    Replies:
    4
    Views:
    366
    emrefan
    Jun 5, 2007
Loading...

Share This Page