Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    system("echo foo");
    
  2. or download this
    #!/usr/bin/perl -w
    use strict;
    my $res = system("/sys/command");
    
  3. or download this
    #!/usr/bin/perl -w
    use strict;
    my $res = `/sys/command`;
    
  4. or download this
    #!/usr/bin/perl -w
    use strict;
    my $file_handle;
    ...
         chomp $line; # remove new line
         do_something( $line );
    }