[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Omaha.pm] explode gt split
On Jun 23, 2008, at 10:55 AM, Jay Hannah wrote:
Wow. PHP's explode() is a much cooler name than Perl's boring old
split().
<?php
$expFileNames = `ls -t output/`;
$expFileNames = explode("\n",$expFileNames);
?>
Too bad you can't just get a list anyway, like in Perl:
$file_list_as_string = `ls -t output/`;
@file_list = `ls -t output/`;
Might as well just go directly to the array, eh?
xoa
--
Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance