Prev: MinGW and Perl 5.12 - Windows 64 bits ActiveState
Next: FAQ 9.24 How do I fetch a news article or the active newsgroups?
From: joinerda on 14 May 2010 15:34 That's a possibility. I'm using print statements right now, but I'm trying to come up with a solution for my end-users that looks as much as possible like the input files they are used to. I wonder what will confuse them more, an extra variable in the format statement, or lots of print and/or printf statements. Thanks! On May 14, 3:04 pm, arus <rus20...(a)copper.net> wrote: > On 5/14/2010 3:02 PM, arus wrote: > > > On 5/14/2010 2:35 PM, joinerda wrote: > >> I would like to use a perl format statement to autogenerate qsub files > >> for a PBS scheduler. The files I need to generate are essentially > >> shell scripts with comments beginning with a hash mark to denote them > >> as pragma for the scheduler. > > >> If I create a format statement that looks like > > >> format QSUBFILE = > >> #PBS -N @<<<<<<<<< > >> $queue > >> . > > Put the hashmark in a variable > > Eg) > > my $hm="#"; > > format QSUBFILE = > > @#PBS -N @<<<<<<<<< > > $hm,$queue > > . > > I forgot to delete your original #. > Please correct that to read > Eg) > my $hm="#"; > format QSUBFILE = > @PBS -N @<<<<<<<<< > $hm,$queue > .
From: John Bokma on 14 May 2010 16:37 joinerda <joinerda(a)gmail.com> writes: posting top not for you thank. > That's a possibility. I'm using print statements right now, but I'm > trying to come up with a solution for my end-users that looks as much > as possible like the input files they are used to. I wonder what will > confuse them more, an extra variable in the format statement, or lots > of print and/or printf statements. Use a templating module, see CPAN. Or format your scalars with sprintf and use a <<HERE document. -- John Bokma j3b Hacking & Hiking in Mexico - http://johnbokma.com/ http://castleamber.com/ - Perl & Python Development
From: Tad McClellan on 14 May 2010 17:24 John Bokma <john(a)castleamber.com> wrote: > posting top not for you thank. one good! -- Tad McClellan email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/" The above message is a Usenet post. I don't recall having given anyone permission to use it on a Web site.
From: Steve M on 15 May 2010 00:16 On 5/14/2010 2:24 PM, Tad McClellan wrote: > John Bokma<john(a)castleamber.com> wrote: > >> posting top not for you thank. > > > one good! > > Hmmmm... in the spirit of the endless quibble, shouldn't the punctuation operator lead, as in: !one Good :-) \s -- "There is no use in your walking five miles to fish when you can depend on being just as unsuccessful near home." M. Twain
From: J�rgen Exner on 15 May 2010 08:22 joinerda <joinerda(a)gmail.com> wrote: >I would like to use a perl format statement to autogenerate qsub files If I remember correctly there have been previous discussions about format() and the general consensus was to use printf() instead, AFAIR because printf() is easier to use and has less problems than format(). jue
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: MinGW and Perl 5.12 - Windows 64 bits ActiveState Next: FAQ 9.24 How do I fetch a news article or the active newsgroups? |