Hi,
We have an application running on AIX5.3 that generates text files that are sent to be printed using the lp command.
The user can specify the number of copies they want printed, but only one copy ever gets printed.
I've checked the lp command that is used, and it correctly specifies... (5 Replies)
Hello Guy,
I have the following information in the sample.txt, can i get the number and output into sample2.txt
-
-
-
-
-
-
-
-
-
-
-
-
- ... (7 Replies)
I'm writing a KSH script that will get a file on the command line (such as input.txt), and in this file there is on number per line. The program needs to take the file, read each and determine the lowest number in the file. I currently have a while loop setup that will correctly out put every... (8 Replies)
Hello all,
How can I find the lowest number every 10 lines? For example i have a list
name1
-0.1
name2
2
name3
3
name4
-3
name5
1
name6
2
name7
34
name8
34 (6 Replies)
I have a problem which I would like to solve by using UNIX power and inspired minds around world. Here is the problem
I have a text file and it has data as follows
1X.....................1234567890123456789T1234598765XT1 (header)
1Z01............(sub HEADER)
P100001............
Q1........... (4 Replies)
Dear all,
I have a question. I have a txt file say 4000 rows X 1800 Column. I 'd like to creat a new column as the first column which is a column of random numbers (n=4000)
thanks a lot!
Lin (2 Replies)
Hi there. I have a number allocation problem whereby I have 2 arrays built from 2 different sources. The arrays will just contain a listed of sorted numbers
@a
1
7
10
14
15
16
@b
1
7
10
11
14
15
16 (2 Replies)
I want to search a file if it contains special strings and if yes, the records found should be mailed.
I can either do it with a temporary file:
/usr/bin/grep somestring somefile > /tmp/tempfile && /usr/bin/mail -s "Found something" email@mycomp.com < /tmp/tempfile... or by running the grep... (10 Replies)
Hi Guys,
I am looking for a way to sort the output below from the "Inuse" count from Highest to Lowest. Is it possible?
Thanks in advance.
user1 0.12 0.06 0 0.12
User Inuse Pin Pgsp Virtual
Unit:... (4 Replies)
I have to split a file containing 100 lines to 5 files say from lines ,1-20 ,21-30 ,31-40 ,51-60 ,61-100
Here is i can do it for 2 file but how to handle it for more than 2 files
awk 'NR < 21{ print >> "a"; next } {print >> "b" }' $input_file
Please advidse.
Thanks (4 Replies)
Discussion started by: abhaydas
4 Replies
LEARN ABOUT DEBIAN
cgi::formbuilder::template::fast
CGI::FormBuilder::Template::Fast(3pm) User Contributed Perl Documentation CGI::FormBuilder::Template::Fast(3pm)NAME
CGI::FormBuilder::Template::Fast - FormBuilder interface to CGI::FastTemplate
SYNOPSIS
my $form = CGI::FormBuilder->new(
fields => @whatever,
template => {
type => 'Fast',
root => '/path/to/templates',
# use external files
define => {
form => 'form.txt',
field => 'field.txt',
invalid_field => 'invalid_field.txt',
},
# or define inline
define_nofile => {
form => '<html><head></head><body>$START_FORM
<table>$FIELDS</table>$SUBMIT $END_FORM</body></html>',
# etc.
},
},
);
DESCRIPTION
This engine adapts FormBuilder to use "CGI::FastTemplate". Please read these docs carefully, as the usage differs from other template
adapters in several important ways.
You will need to define three templates: "form", "field", and "invalid_field". You can use "define" to point to external files (which is
the recommended "CGI::FastTemplate" style), or "define_nofile"/ "define_raw" to define them inline. The templates in "define_nofile" take
precedence over "define_raw", and both of these take precedence over "define".
my $form = CGI::FormBuilder->new(
# ...
template => {
type => 'FastTemplate',
root => '/path/to/templates',
define => {
form => 'form.txt',
field => 'field.txt',
invalid_field => 'invalid_field.txt',
},
# or, you can define templates directly
define_nofile => {
form => '<html><head></head><body>$START_FORM<table>'
'$FIELDS</table>$SUBMIT $END_FORM</body></html>',
# etc.
},
},
# ...
);
If you use "define" with external templates, you will probably also want to define your template root directory with the "root" parameter.
Within each of the field templates, the following variables are available:
$NAME # $field->name
$FIELD # $field->tag (HTML input tag)
$VALUE # $field->value (first value only!)
$LABEL # $field->label
$COMMENT # $field->comment
$ERROR # $field->error
$REQUIRED # $field->required ? 'required' : 'optional'
All the fields are processed in sequence; valid fields use the "field" template, and invalid fields the "invalid_field" template. The
result from each of these is appended into the $FIELDS variable, which you should use in your "form" template. In the "form" template, you
also have access to these variables:
$TITLE # title of the form
$START_FORM # opening form tag
$SUBMIT # the submit button
$RESET # the reset button
$END_FORM # closing form tag
$JS_HEAD # validation JavaScript
Note that since "CGI::FastTemplate" doesn't use anything other than simple scalar variables, there are no variables corrosponding to the
lists that other engines have (e.g. "fields" or "options" lists in "TT2" or "Text::Template").
SEE ALSO
CGI::FormBuilder, CGI::FormBuilder::Template, CGI::FastTemplate
AUTHOR
Copyright (c) 2005-2006 Peter Eichman <peichman@cpan.org>. All Rights Reserved.
Maintained as part of "CGI::FormBuilder" by Nate Wiger <nate@wiger.org>.
This module is free software; you may copy this under the terms of the GNU General Public License, or the Artistic License, copies of which
should have accompanied your Perl kit.
perl v5.14.2 2011-09-16 CGI::FormBuilder::Template::Fast(3pm)