diff options
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/util.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/urpm/util.pm b/urpm/util.pm index 0af9cc53..0a7bbd00 100644 --- a/urpm/util.pm +++ b/urpm/util.pm @@ -14,7 +14,7 @@ our @EXPORT = qw(min max quotespace unquotespace partition put_in_hash uniq uniq_ begins_with difference2 intersection member - file_size cat_ cat_utf8 output_safe dirname basename + file_size cat_ cat_utf8 output_safe append_to_file dirname basename ); (our $VERSION) = q($Revision$) =~ /(\d+)/; @@ -161,6 +161,13 @@ sub output_safe { 1; } +sub append_to_file { + my $f = shift; + open(my $F, '>>', $f) or die "writing to file $f failed: $!\n"; + print $F $_ foreach @_; + 1; +} + 1; __END__ |