#!/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;