docs
[mirrors/Programs.git] / perl / curses / file.pl
CommitLineData
21c4e167
H
1#!/usr/bin/env perl
2
3 use Curses::UI;
c9d9797f 4 my $cui = new Curses::UI( -color_support => 1, -compat => 0, -utf8 => 1);
21c4e167
H
5 #my $win = $cui->add('window_id', 'Window');
6
7 my $file = $cui->filebrowser(
8 -path => "/tmp",
9 -show_hidden => 1,
10 );
11
12 # Filebrowser will return undef
13 # if no file was selected.
14 if (defined $file) {
15 unless (open F, ">$file") {
16 print F "Hello, world!\n";
17 close F;
18 } else {
19 $cui->error(qq(Error on writing to "$file":\n$!));
20 }
21 }
22
23#print "TEXT: $text \n";
This page took 0.151921 seconds and 4 git commands to generate.