dreamer
dreamer

Reputation: 478

env variable in perl

how do i set environment variable in perl on a remote machine?

I ssh into the remote machine and then try tu set environment variable through export command. But it does not set environment variable

`ssh -2A [email protected]`;
`export someEnv=no`;

Upvotes: 1

Views: 164

Answers (2)

user1587276
user1587276

Reputation: 936

ssh -2A [email protected] "export VAR=value && ./script.pl"

Upvotes: 1

ikegami
ikegami

Reputation: 385897

ssh -2A [email protected] 'someEnv=no script.pl'

Upvotes: 2

Related Questions