Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Error compiling script running powershell command

by Happy-the-monk (Canon)
on Dec 28, 2017 at 23:27 UTC ( [id://1206376]=note: print w/replies, xml ) Need Help??


in reply to Error compiling script running powershell command

-Replace @

It is not compiled, it is called interpolation when a variable is replaced with its contents.

That is what you want Perl to do with your variable $un and Perl could not have guessed you did not want it to do the same with the next one.

Your simple solution is putting a backslash in front of the next variable, so make it read -Replace \@

Cheers, Sören

Créateur des bugs mobiles - let loose once, run everywhere.
(hooked on the Perl Programming language)

  • Comment on Re: Error compiling script running powershell command

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-18 00:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found