Working out a small problem, I have a need of a Perl snippet which might look something like this:
What I want to happen is for "if" to resolve as "true" every time a whole number is produced by the quotient of "$changingNumber / 2"; allowing the "do something" block only then to be executed.
But what I get, instead, is the eval of "true" and the consequent "do something" block execution for every value of "$changingNumber" of 2 and greater.
I know this is probably a simple error on my part, but I can't quite elucidate what would do the trick here...
Hi,
I have a script which takes a value from a file and performs calculations on it. Trouble is that this value is a float not an integer and it errors at the decimal point!
eg. 94.62
I would like to be able to detect the length of the float (in this above case, 5 characters), and simply do a... (2 Replies)
This is the code:
while test 1 -eq 1
do
read a
$a
if test $a = stop
then
break
fi
done
I read a command on every loop an execute it.
I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test.
For example echo hello.
Now the... (1 Reply)
Hello all,
I'm trying to automate an if statement in my Perl script. The script opens an input file for reading, checks each line in the file for a particular substring, and if it finds the substring, writes it to an output file.
There are approximately 200 different input files. Each has... (3 Replies)
Hello,
I need help in creating a PERL script for parsing test result files to get the results (pass or fail). Each test case execution generates a directory with few files among which we are interested in .result file.
Lets say Testing is home directory. If i executed 2 test cases. It will... (4 Replies)
In Perl, what does a backslash preceding an integer do like \32768 ?
The $/ section of perlvar writes:
local $/ = \32768; # or \"32768", or \$var_containing_32768
How is \32768 different from just 32768 without backslash?
I do not understand the backslashes in \"32768" and... (1 Reply)
Hi All,
i have problem here whenever i run this perl script that is pasted here, it inserts a negative number in place of PO_nbr
.
What the script does is reads a pipe delimited file and then using some values on the file it will query db to get few other values and then it inserts the... (4 Replies)
Discussion started by: selvankj
4 Replies
LEARN ABOUT DEBIAN
net::sieve::script::action
Net::Sieve::Script::Action(3pm) User Contributed Perl Documentation Net::Sieve::Script::Action(3pm)NAME
Net::Sieve::Script::Action - parse and write actions in sieve scripts
SYNOPSIS
use Net::Sieve::Script::Action;
$action = Net::Sieve::Script::Action->new('redirect "bart@example.edu"');
or
$action = Net::Sieve::Script::Action->new();
$action->command('redirect');
$action->param('"bart@example.edu"');
DESCRIPTION
Action object for Net::Sieve::Script, with command and optional param.
Support RFC 5228, RFC 5230 (vacation), regex draft
METHODS
CONSTRUCTOR new
Argument : "command param" string,
parse valid commands from RFCs, param are not validate.
command
read command : "$action->command()"
set command : "$action->command('stop')"
param
read param : "$action->param()"
set param : "$action->param(' :days 3 "I am away this week."')"
equals
return 1 if actions are equals
AUTHOR
Yves Agostini - Univ Metz - <agostini@univ-metz.fr>
<http://www.crium.univ-metz.fr>
COPYRIGHT
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.10.0 2008-09-15 Net::Sieve::Script::Action(3pm)