<%args> $stamp_path <%init> my $stamp_path_preferred = $stamp_path; $stamp_path_preferred =~ s|/(\w+)(\d)\.fits|$1/$1$2|; my $path1 = "/data/mops13.0/stamp-store/stamps/special-stamps/$stamp_path_preferred.fits"; my $path2 = "/data/mops13.0/stamp-store/stamps/special-stamps/$stamp_path.fits"; #my $fits = read_file($path1) || read_file($path2); my $fits = read_file($path2); $r->content_type('image/fits'); $m->clear_buffer; $m->print($fits); $m->abort;