YanoRyuichi.com/
Wiki
Blog
GitHub
Sandbox
開始行:
* ファイルアップロード [#dea80ad8]
$c->req->upload('csv_file')でCatalyst::Request::Uploadオ...
sub import_csv : Local {
my ( $self, $c ) = @_;
my $upload;
unless ($upload = $c->req->upload('csv_file') ) {
$c->detach('index');
}
my $csv = Text::CSV->new( { binary => 1 } );
my $idx = 0;
my $fh = $upload->fh;
while ( my $col = $csv->getline($fh) ) {
my ( $login_id, $passwd ) = ( $col->[0], $col->[1]...
}
}
http://search.cpan.org/perldoc?Catalyst::Request::Upload
終了行:
* ファイルアップロード [#dea80ad8]
$c->req->upload('csv_file')でCatalyst::Request::Uploadオ...
sub import_csv : Local {
my ( $self, $c ) = @_;
my $upload;
unless ($upload = $c->req->upload('csv_file') ) {
$c->detach('index');
}
my $csv = Text::CSV->new( { binary => 1 } );
my $idx = 0;
my $fh = $upload->fh;
while ( my $col = $csv->getline($fh) ) {
my ( $login_id, $passwd ) = ( $col->[0], $col->[1]...
}
}
http://search.cpan.org/perldoc?Catalyst::Request::Upload
ページ名: