title: How do I extract device info and mountpoints from fstab using Perl?
body: <p>I'm new to Perl and I really need help witch a specific issue.</p>
  
  <p>I need to extract info from my fstab, but there's a lot of information in there and I only want the information about the devices and their mount points.
  The closest I got to finding an answer was:
  <a href="http://www.freebsd.org/doc/en/articles/vinum/perl.html" rel="nofollow">http://www.freebsd.org/doc/en/articles/vinum/perl.html</a> </p>
  
  <p>But since I'm new to Perl I have a hard time tweaking the code so it helps me with my problem</p>
  
  <p>This is my fstab, but I only want the 3 "dev" lines including mountpoints, any smart way to do this?</p>
  
  <pre><code>/dev/disk/by-id/usb-ST925041_0AS_FF9250410A0000000000005FF87FF7-part2 /                    
  ext3       noatime,nodiratime,acl,user_xattr 1 1
  /dev/disk/by-id/usb-ST925041_0AS_FF9250410A0000000000005FF87FF7-part3 /var/log             
  ext3       noatime,nodiratime,acl,user_xattr 1 2
  /dev/disk/by-id/usb-ST925041_0AS_FF9250410A0000000000005FF87FF7-part1 swap                 swap       
  defaults              0 0
  proc                 /proc                proc       defaults              0 0
  sysfs                /sys                 sysfs      noauto                0 0
  debugfs              /sys/kernel/debug    debugfs    noauto                0 0
  usbfs                /proc/bus/usb        usbfs      noauto                0 0
  devpts               /dev/pts             devpts     mode=0620,gid=5       0 0
  </code></pre>
  
  <p>Help is very appreciated, thanks in advance!</p>