Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

How to ask user for file name and save the output to a new text file

by mmazlan67 (Novice)
on Jun 19, 2017 at 03:36 UTC ( [id://1193076]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    print "Enter the name of the file: ";
    my $base_dir = <>;
    chomp($base_dir);open( my $DATA, "<" , $base_dir) or die "Can't open f
    +ile '$base_dir': $!";
    while ( <$DATA> )
    
  2. or download this
    #! /tools/perl/5.8.8/linux/bin/perl
    use strict;
    ...
                    print "$_";
            }
    }
    
  3. or download this
     #! /tools/perl/5.8.8/linux/bin/perl
    use strict;
    use warnings;
    ...
    
    print "$mode $name $set $value\n";
    }
    
  4. or download this
    #! /tools/perl/5.8.8/linux/bin/perl
    
    ...
    my $name='inoutdata';
    
    system("uuencode /home/user/set/result.txt | mailx -s '$name' email");
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1193076]
Approved by Discipulus
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-19 12:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found