in reply to -e file test won't follow symlinks?
Here I used a dry run. If you want to create a symlink, comment out name and change -dry_run => 1 to 0. It requires 5.10.1+.
#!/usr/bin/perl use Modern::Perl; use Setup::File::Symlink qw(setup_symlink); my $x = '/root/Desktop/tmp'; my $res = setup_symlink( name => "create(dry run)", symlink => "/y", target => "/$x/x", other_args => {-dry_run => 1}, status => 200, exists => 1, ); print "status: 200\n", if $res->[0] == 200; print "status: 304\n", if $res->[0] == 304;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: -e file test won't follow symlinks?
by sedusedan (Pilgrim) on Oct 04, 2012 at 07:00 UTC |