#!/usr/bin/perl

open (DATEI, "/etc/passwd") or die "Sitzt du vor einem Computer?";

print "\n\n";

@array = ('name', 'password', 'UID', 'GID', 'info', 'home', 'shell');
@info = ('Full Name', 'Room Number', 'Work Phone', 'Home Phone', 'Other');

for $line ()
{
	print "\n";
	chomp $line;
	$i = 0;
	for $feld (split /:/, $line)
	{
		print "\t<@array[$i]>";
		if (@array[$i] =~ /info/)
		{
			print "\n";
			$j = 0;
			for $k (split /,/, $feld)
			{
				print "\t\t<@info[$j]>$k\n";
				$j++;
			}
			print "\t";
		} else {
			print "$feld";
		}
		print "\n";
		$i++;
	}
	print "\n";
}
Fr Jul 30 13:54:24 CEST 2021
patent_button.gif valid-html401.png elektra.jpg fsfe-logo.png valid-css.png vim.gif anybrowser.gif