#!/usr/bin/perl -w use strict; my $hi = "flux"; print &scroll($hi); sub scroll { my ($i) = @_; my @x; push @x,substr($i,$_,1),"\n" for (0 .. length $i); return @x; }