title: bash, grep, export, perl,ENV and if statements
body: <p>I have this grep statements in bash script like</p>
  
  <pre><code>HDD3_block=$(grep -i $username block_access.db -s | awk -F ":" '{print $3}')
  </code></pre>
  
  <p>and I if use echo $HDD3_block I get 10 20 30 so I used </p>
  
  <pre><code>export HDD3_block
  </code></pre>
  
  <p>so I can used this variable in Perl</p>
  
  <pre><code>my $var4 = $ENV{"HDD3_block"};
  </code></pre>
  
  <p>I know I'm getting 10 20 30 because I used print "$var4\n"; but that not what I want I'm trying to run 10 20 30 through if statements in perl. Like</p>
  
  <pre><code>print "var result                   comments\n";
  if ($var4 &gt; 20){
  print "$var4                        this is more than 20\n";
  }elsif ($var &lt; 20){
  print "$var4                        this is less than 20\n";
  }
  </code></pre>
  
  <p>but I am getting an error saying 10\n20\n30 isn't numeric so I'm guessing its getting all that value at once. Is there a way to separate 10 20 30 so the numbers goes through if statement one number at a time like 10 goes through if statement and it goes back get 20 and goes through if statement and it goes back gets 30 and goes through if statements. or is there another way of doing it.</p>