bluedragon2
IS-IT--Management
I have a strange problem happening that hopefully someone can explain why:
If I run this code:
$a1 = "vcx";
$a2 = "xxx.xxx.xxx.xxx";
$a3 = "01.09.04-14.02.50";
$b = "/tmp/tmpdir/";
$c = "/tmp";
system ("mv", "$c$a1\@$a2\@$a3", "$b"
It will run correctly and move the file vcx@xxx.xxx.xxx.xxx@01.09.04-14.02.50 from /tmp to /tmp/tmpdir/
Now, if I do it this way:
$line = "vcx@xxx.xxx.xxx.xxx@01.09.04-14.02.50";
@comb = split(/\@/,$line);
$a1 = $comb[0];
$a2 = $comb[1];
$a3 = $comb[2];
$b = "/tmp/tmpdir/";
$c = "/tmp/";
system ("mv", "$a1\@$a2\@$a3", "$nd"
I get an error:
mv: cannot access /tmp/vcx@xxx.xxx.xxx.xxx@01.09.04-14.02.50
Does anyone know the reason for this?
Thanks,
[Blue]Blue[/Blue] [Dragon]
If I wasn't Blue, I would just be a Dragon...
If I run this code:
$a1 = "vcx";
$a2 = "xxx.xxx.xxx.xxx";
$a3 = "01.09.04-14.02.50";
$b = "/tmp/tmpdir/";
$c = "/tmp";
system ("mv", "$c$a1\@$a2\@$a3", "$b"
It will run correctly and move the file vcx@xxx.xxx.xxx.xxx@01.09.04-14.02.50 from /tmp to /tmp/tmpdir/
Now, if I do it this way:
$line = "vcx@xxx.xxx.xxx.xxx@01.09.04-14.02.50";
@comb = split(/\@/,$line);
$a1 = $comb[0];
$a2 = $comb[1];
$a3 = $comb[2];
$b = "/tmp/tmpdir/";
$c = "/tmp/";
system ("mv", "$a1\@$a2\@$a3", "$nd"
I get an error:
mv: cannot access /tmp/vcx@xxx.xxx.xxx.xxx@01.09.04-14.02.50
Does anyone know the reason for this?
Thanks,
[Blue]Blue[/Blue] [Dragon]
If I wasn't Blue, I would just be a Dragon...