title: Perl - script to automatically add username and password to the Linux system
body: <p>Good day!
  I just wanted help with one issue. I created students.txt list where it is like this in CentOS Linux command line:</p>
  
  <pre><code>said:123456
  taha:456789
  </code></pre>
  
  <p>I created perl file where there is a script:</p>
  
  <pre><code>#!/usr/bin/perl
  $filename = 'students.txt';
  open(FILE, $filename);
  while(&lt;FILE&gt;)
  {
  chomp;
  ($user, $passcode) = split(/:/, $_);
  system "useradd $user  -m -p  $passcode";
  }
  close FILE;
  print "Users are created successfully :) \n";
  </code></pre>
  
  <p>After running the perl file, it is adding the usernames but not passwords. Also I am new to Perl. Thank you in advance.</p>