Help for this page

Select Code to Download


  1. or download this
    open (DATA, "< C:/Perl_Scripts/InputFile.txt");
    
  2. or download this
    open my $DATA, '<', 'C:/Perl_Scripts/InputFile.txt' or die "Cannot ope
    +n 'C:/Perl_Scripts/InputFile.txt' because: $!";
    
  3. or download this
    my @array_of_data = <DATA>;
    close (DATA);
    
    foreach my $line (@array_of_data)
    {
    
  4. or download this
    while ( my $line = <$DATA> ) {
    
  5. or download this
    if ( $line =~ m/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\.csv$/g )
    
    {
          print "Match $1";
    }