Help for this page

Select Code to Download


  1. or download this
    perl -ne'/(data)/ && print $1 and last' file.txt
    
    perl -ne'/(data)/ && print $1 && last' file.txt
    
  2. or download this
    .. print ($1) ...
    
  3. or download this
    perl -MO=Deparse -ne'/(data)/ && print $1 && last' file.txt
    
  4. or download this
    LINE: while (defined($_ = <ARGV>)) {
        print $1 && last if /(data)/;
    }
    
  5. or download this
    perl -MO=Deparse -ne'/(data)/ && print ($1) && last' file.txt
    
  6. or download this
    LINE: while (defined($_ = <ARGV>)) {
        last if /(data)/ and print $1;
    }
    
  7. or download this
    perl -MO=Deparse -ne'/(data)/ && print $1 and last' file.txt
    
  8. or download this
    LINE: while (defined($_ = <ARGV>)) {
        last if /(data)/ and print $1;
    }