Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: VBA to Perl

by BrowserUk (Patriarch)
on Feb 10, 2006 at 12:06 UTC ( [id://529337]=note: print w/replies, xml ) Need Help??


in reply to VBA to Perl

You may already know the answer to your own question :)

In the line giving the error

$Word->Selection->Text="This is the inserted text";

You are trying to treat $Word->Selection->Text as a variable and perl is complaining that Can't modify non-lvalue subroutine call, which means that it must be a subroutine and not a variable.

Three lines lower down you have

$Word->Selection->Text("This is the inserted text 2");

Same thing, but this time you are using it as a subroutine. Change the error line to match the other one and that error will probably go away.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-04-19 10:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found