title: Perl regular expression split help needed
body: <p>I'm trying to split records like these </p>
  
  <pre><code>123.45.67.89/24 - String - Other string details (/25-/30)
  </code></pre>
  
  <p>into 3 variables containing <code>"123.45.67.89","24"</code> and <code>"String - Other string details (/25-/30)"</code></p>
  
  <pre><code>#!/usr/bin/perl -w
  
  use Data::Dumper;
  
  $file = "Network_Usage.clean";
  
  open (Network_Usage,$file);
  
  while (&lt;Network_Usage&gt;) {
          chomp;
          my $row = $_;
          my @array = $row =~ /((([0-9]{1,3})\.{0,1}){4})\/([0-9]{1,2}) - (.*)/;
          print Dumper ( @array);
          exit;
  }
  
  close (Network_Usage);
  </code></pre>
  
  <p>But I'm getting this result : </p>
  
  <pre><code>root@host:~/# ./split.pl 
  $VAR1 = '123.45.67.89'; 
  $VAR2 = '89'; 
  $VAR3 = '89'; 
  $VAR4 = '24'; 
  $VAR5 = '';
  </code></pre>
  
  <p>Event if it is doing the job for me ( I can use <code>$VAR1,4,5</code>). I would like to know what am I doing wrong to receive the results in <code>$VAR2/3</code>.</p>