in reply to Net::OpenSSH quoting problems
G'day jhuijsing,
You haven't actually asked a question, so I don't know exactly which part of this you're having difficulties with.
If you just want to know how to get from 'item 0-9 10-14' to 'item\ 0-9\ 10-14', you can do it like this:
#!/usr/bin/env perl -l use strict; use warnings; my $object = 'item 0-9 10-14'; print $object; $object =~ s/( \d+-\d+)/\\$1/g; print $object;
Output:
item 0-9 10-14 item\ 0-9\ 10-14
If you wanted something else, please specify.
-- Ken
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Net::OpenSSH quoting problems
by jhuijsing (Acolyte) on May 13, 2014 at 05:53 UTC | |
by Laurent_R (Canon) on May 13, 2014 at 07:44 UTC | |
by soonix (Chancellor) on May 13, 2014 at 13:08 UTC | |
by jhuijsing (Acolyte) on May 13, 2014 at 21:33 UTC | |
by salva (Canon) on May 14, 2014 at 07:24 UTC | |
by jhuijsing (Acolyte) on May 14, 2014 at 22:35 UTC | |
|