Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Using system (); with Strawberry Perl

by jwkrahn (Abbot)
on Nov 25, 2021 at 07:11 UTC ( [id://11139102]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    system ('grep -l "DATAmessage.*3\.0" *.xml > 3.0_files_arraydata.txt')
    +;
    
  2. or download this
    
    open my $FH, '>', '3.0_files_arraydata.txt'
    ...
            }
        }
    
  3. or download this
    system ("mv temp_3.0_files_onixarraydata.txt 3.0_files_arraydata.txt")
    +;
    
  4. or download this
    rename 'temp_3.0_files_onixarraydata.txt', '3.0_files_arraydata.txt'
        or die "Cannot move 'temp_3.0_files_onixarraydata.txt' because: $!
    +";
    
  5. or download this
    system ("cat *files_arraydata.txt > data2.txt");
    
  6. or download this
    open my $FH, '>', 'data2.txt'
        or die "Cannot open 'data2.txt' because: $!";
    ...
        print $FH $_ while <>;
        }
    
  7. or download this
    system ("rm data2.txt");
    
  8. or download this
    unlink 'data2.txt'
        or die "Cannot delete 'data2.txt' because: $!";
    
  9. or download this
    system ("sort -u data2.txt > data.txt");
    
  10. or download this
    open my $IN,  '<', 'data2.txt'
        or die "Cannot open 'data2.txt' because: $!";
    ...
        print $OUT sort grep { ! $unique{ $_ }++ } <$IN>;
        }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11139102]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-03-28 18:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found