use IO::All; $CLASSPATH = io('file_with_classpath')->slurp;