hi
this is an example of code:
This finds $regex and print out the $res, but "$1" doesn't work. I've tried <\$1> as well and other variations. How to make it work?
Hi All,
I need some help with arrays. I need to take input from the user for hostname, username and password until he enters .(dot) or any other character and store the values in the variable array.
I would further connect to the hostname using username and passwd and copy files from server to... (7 Replies)
Hi All,
I can;t seem to print out the array in sequence using the below subroutine.
My first element in the array @lotsuffix is suppose to be $lotsuffix as defined in the subroutine, but when the array variable is being pass on the main program, my first element actually becomes $lotsuffix ! ... (4 Replies)
Hi all
I need help on how to store two or more date formates captured using regex from an input sentence in PERL ? For example, I have an input sentence consisting of two dates such as :
The departure date is August 12, 2009 and arrival date is 20.08.2009.
Now, I want to capture the two... (4 Replies)
Hi Forum
im trying to use grouping in a regex statement in a function in a script
this is the criteria im trying to match :It MUST have 3 character at the beginning. After that it can have a mix of spaces,alpha-numeric and dashes in any order
eg HUG this-stuff, FGU taylor-8-shoes, ZDFnintendo... (2 Replies)
Hi so I have these files where the first thing in them says something along the lines of "This document was accessed 'date' blah blah", I was thinking of a way to extract that date and then sort the files based on that date.
My question is how do I get rid of the words in that statement so that... (6 Replies)
I am writing the code in perl.
I have an array in perl and each variable in the array contains the data in the below format
Now I need to check the below variable w.r.t system month I need to store the date and time(Tue Aug 7 03:54:12 2012) from the below data into file if contains only 'Aug'... (5 Replies)
Requirement 1) I need to execute 15 SQL queries in oracle through linux script. All these query results needs to be stored in array variables.
Requirement 2) And these 15 queries needs to be executed in parallel.
Requirement 3) Once all the queries executed then the shell script should... (3 Replies)
Trying to do some control flow parsing based on the index postion of an array member. Here is the pseudo code I am trying to write in (preferably in pure bash) where possible. I am thinking regex with do the trick, but need a little help.
pesudo code
if == ENDSINFIVEINTS ]]; then
do... (4 Replies)
Hi
I am trying to store the output of a command into an array in perl script.
I am able to store but the problem is i am unable to print the array line with one line space. i mean i inserted the \n in loop ...but not getting the result.
I have written like this
#!/usr/bin/perl
@a =... (2 Replies)
Discussion started by: kumar85shiv
2 Replies
LEARN ABOUT DEBIAN
data::formvalidator::constraintsfactory
Data::FormValidator::ConstraintsFactory(3pm) User Contributed Perl Documentation Data::FormValidator::ConstraintsFactory(3pm)NAME
Data::FormValidator::ConstraintsFactory - Module to create constraints for HTML::FormValidator.
DESCRIPTION
This module contains functions to help generate complex constraints.
If you are writing new code, take a look at Data::FormValidator::Constraints::MethodsFactory instead. It's a modern alternative to what's
here, offering improved names and syntax.
SYNOPSIS
use Data::FormValidator::ConstraintsFactory qw( :set :bool );
constraints => {
param1 => make_or_constraint(
make_num_set_constraint( -1, ( 1 .. 10 ) ),
make_set_constraint( 1, ( 20 .. 30 ) ),
),
province => make_word_set_constraint( 1, "AB QC ON TN NU" ),
bid => make_range_constraint( 1, 1, 10 ),
}
BOOLEAN CONSTRAINTS
Those constraints are available by using the ":bool" tag.
make_not_constraint( $c1 )
This will create a constraint that will return the negation of the result of constraint $c1.
make_or_constraint( @constraints )
This will create a constraint that will return the result of the first constraint that return an non false result.
make_and_constraint( @constraints )
This will create a constraint that will return the result of the first constraint that return an non false result only if all constraints
returns a non-false results.
SET CONSTRAINTS
Those constraints are available by using the ":set" tag.
make_set_constraint( $res, @elements )
This will create a constraint that will return $res if the value is one of the @elements set, or the negation of $res otherwise.
The "eq" operator is used for comparison.
make_num_set_constraint( $res, @elements )
This will create a constraint that will return $res if the value is one of the @elements set, or the negation of $res otherwise.
The "==" operator is used for comparison.
make_word_set_constraint( $res, $set )
This will create a constraint that will return $res if the value is a word in $set, or the negation of $res otherwise.
make_cmp_set_constraint( $res, $cmp, @elements )
This will create a constraint that will return $res if the value is one of the @elements set, or the negation of $res otherwise.
$cmp is a function which takes two argument and should return true or false depending if the two elements are equal.
NUMERICAL LOGICAL CONSTRAINTS
Those constraints are available by using the ":num" tag.
make_clamp_constraint( $res, $low, $high )
This will create a constraint that will return $res if the value is between $low and $high bounds included or its negation otherwise.
make_lt_constraint( $res, $bound )
This will create a constraint that will return $res if the value is lower than $bound, or the negation of $res otherwise.
make_le_constraint( $res, $bound )
This will create a constraint that will return $res if the value is lower or equal than $bound, or the negation of $res otherwise.
make_gt_constraint( $res, $bound )
This will create a constraint that will return $res if the value is greater than $bound, or the negation of $res otherwise.
make_ge_constraint( $res, $bound )
This will create a constraint that will return $res if the value is greater or equal than $bound, or the negation of $res otherwise.
OTHER CONSTRAINTS
make_length_constraint($max_length)
This will create a constraint that will return true if the value has a length of less than or equal to $max_length
SEE ALSO Data::FormValidator(3)AUTHOR
Author: Francis J. Lacoste <francis.lacoste@iNsu.COM> Maintainer: Mark Stosberg <mark@summersault.com>
COPYRIGHT
Copyright (c) 2000 iNsu Innovations Inc. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms as perl itself.
perl v5.14.2 2011-11-25 Data::FormValidator::ConstraintsFactory(3pm)