#!/usr/bin/perl -w use strict; my $longstring="firstlast"; my @entries=split(//,$longstring); print "$entries[0] $entries[1]\n";