title: trying to understand this s/\r?\n$// perl regex
body: <p>to all perl gurus! I have the following snip of code and there is a specific line that I am trying to understand. Been reading around and manage to understand that it's a perl regex. But, I haven't been able to understand what each one is going. correct me if I am wrong for what I am about to put.</p>
  
  <p>this particular part is for reading the EDID content from a files which are in HEX. I believe what the previous guy was trying to do is take out any spaces and next lines. But not completely sure.</p>
  
  <pre><code>for (my $int=1;$int&lt;9;$int++){
  my $line = &lt;$info&gt;;
  $line =~ s/\r?\n$//;
  chomp $line;
  $line =~ s/\s+//g;
  if ( $line eq "00000000000000000000000000000000" ){ 
      print "bad EDID information in file $file --- all 0's\r\n";
      close $info;
      close $OUTFILE;
      exit 1;
  }
  
  
  print $OUTFILE $line
  }
  </code></pre>
  
  <p>now, this part is the one that throws me off.</p>
  
  <pre><code>$line =~ s/\r?\n$//;
  </code></pre>
  
  <p>what I want to understand is... what is s/ \r? \n $// is doing. I believe \n is next line. But not sure about the other ones. Any comment or help is always welcome.</p>