#!/usr/bin/perl -w use strict; $/=undef; # undefines the record separator # which is by default \n # this means that there is no "line" # separator my $bigString = ; # would normally read one "line" # but since record separator is undefined # it reads all the data as a single string # this is what "slurp" the file means my @prices = $bigString =~ m|\s*(.+?)\s*|ig; print "@prices"; # prints: 1.91 295.3 KEuro __DATA__ 1.91 295.3 KEuro