Skip to content

Instantly share code, notes, and snippets.

@tadzik
Created November 19, 2014 22:59
Show Gist options
  • Save tadzik/a6b2e2c8e951aea56634 to your computer and use it in GitHub Desktop.
Save tadzik/a6b2e2c8e951aea56634 to your computer and use it in GitHub Desktop.
┌─[tadzik@yavin]─[~]
└─[%]─> cat script.pl
use strict;
use warnings;
use feature 'say';
use File::Copy;
mkdir 'empty';
chdir 'empty';
my $from = 'one';
my $to = 'two';
say "Move error code: " . move($from, $to);
say "Does file exist: " . ((-e $from) ? 1 : 0);
┌─[tadzik@yavin]─[~]
└─[%]─> perl script.pl
Move error code: 0
Does file exist: 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment