my $stdin = 'Some input text here'; open(STDIN,'<', \$stdin);