Last active
November 6, 2017 16:54
-
-
Save llamerr/4016895 to your computer and use it in GitHub Desktop.
file_put_contents for perl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub file_put_contents { | |
my $fh; | |
open($fh, '>>', "/some/path/file.txt") or die "Couldn't open: $!"; | |
print $fh "\n"; | |
print $fh @_[0]; | |
print $fh @_[1]; | |
close $fh; | |
} | |
file_put_contents("1:","new"); | |
use Data::Dumper; | |
file_put_contents("1:",Dumper($cgi)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment