A simple program that assigns to $_ using .
#!/usr/local/bin/perl while (<STDIN>) { ($first) = split (//, $_); print ("$first\n"); }