Sponsored Content
Full Discussion: form validation with perl
Top Forums Shell Programming and Scripting form validation with perl Post 302152790 by cbkihong on Friday 21st of December 2007 08:46:27 AM
Old 12-21-2007
It is difficult to provide concrete help:

1) You previously mentioned the posted script didn't work, but my test of the script verbatim you said was what you intended to get;

2) You did not tell what are the differences between the script you deployed and the one you posted. Of course, you should post the simplest variation of your script, in full, that is sufficient to demonstrate and have others reproduce the problem.

I have not visited the link you provided, so I do not quite understand how I can help you with this. If you have further details to share, please feel free to post again.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

perl cgi form action target

Hello All, I was trying to come up with a form using perl cgi. I then created a frame to show the output of the form. Refer below print $display_form->start_form(-title=>"Updateuser", -style => 'font-size: 9pt; color: #202020 ; font-family: Verdana', action=>"${DOCROOT}updateUser.pl",... (4 Replies)
Discussion started by: garric
4 Replies

2. Web Development

in cgi perl script a form

hi,i hav a form in cgi perl script.this script accepts a value from user from another html form, and depending upon this value,i need to disable /enable radio buttons in cgi-perl script wen second page is displayed on executing cgi perl script.how do i do it using javascript? (0 Replies)
Discussion started by: raksha.s
0 Replies

3. Shell Programming and Scripting

perl linux file name validation

Hi Everyone, #!/usr/bin/perl $a = ".a!"; if ($a =~ s///g) { print "invalid file name\n"; } else { print "valid file name\n"; } but the output is: Invalid range "_-." in regex; marked by <-- HERE in m// at ./a.pl line 5. the linux file name should be A-Z, a-z,... (8 Replies)
Discussion started by: jimmy_y
8 Replies

4. Shell Programming and Scripting

on HTML form, Call Expect in Perl problem

Hi I have a successfullly run perl script (by issuing command "perl sub.pl" under shell mode) and this sub.pl will call sub.exp successfully. The sub.exp expect script is basically to login to a server and run some commands and put the output into a sub.txt file, it takes about 5 seconds to... (0 Replies)
Discussion started by: cxbest
0 Replies

5. Shell Programming and Scripting

Perl script :- Phone number validation

Hi All, I am doing a perl script validation for Phone numbers. The normal phone number format is 01-32145. I need to do two validations for the phone number 1) A valid phone number can have at least two digits as prefix and at least five digits as postfix. e.g. 01-01011 2) A... (5 Replies)
Discussion started by: subin_bala
5 Replies

6. Shell Programming and Scripting

How to make a long print string to shotcut form in perl?

print "1.readfromfile\n2.add_ex1(4,5)\n3.add_ex2(11,5)\n4.add_ex3(9,3)\n5.add_ex4(91,4)\n"; How to do it in this form: print "1.readfromfile\n 2.add_ex1(4,5)\n 3.add_ex2(11,5)\n 4.add_ex3(9,3)\n 5.add_ex4(91,4)\n"; (3 Replies)
Discussion started by: cola
3 Replies

7. Shell Programming and Scripting

Form validation in PHP

My form validation script looks like this of the form like this.... <html> <form method="POST" action=""> <table > <tr> <td >Name:</td> <td ><input type="text" name="name" size="30%"></td> </tr> <tr> <td >Phone:</td> <td ><input type="text" name="phone" size="30%"></td> </tr>... (0 Replies)
Discussion started by: gameboy87
0 Replies

8. Programming

help need in the perl script that create one xml file form multiple files.

Hi every one, Please excuse me if any grammatical mistakes is there. I have multiple xml files in one directory, I need to create multiple XML files into one XML file.example files like this</p> file1:bvr.xml ... (0 Replies)
Discussion started by: veerubiji
0 Replies

9. Shell Programming and Scripting

perl: How to improve with minimal validation of its input??

The Code: #!/usr/bin/perl use strict; use warnings; print "Please enter numbers, separated by commas: "; my $data=<STDIN>; chomp $data; my @dataset=split(/,/, $data); my $sum = 0; foreach my $num (@dataset) { $sum += $num; } my $total_nums = scalar(@dataset); my $mean =... (1 Reply)
Discussion started by: 300zxmuro
1 Replies
POWERD(8)						    BSD System Manager's Manual 						 POWERD(8)

NAME
powerd -- power management daemon for sysmon SYNOPSIS
powerd [-dn] DESCRIPTION
powerd acts upon power management events posted by the kernel's power management facility. When events are posted, powerd translates the event into a script name and a list of arguments. powerd then runs the script in order to implement the power management policy defined by the system administrator. powerd supports the following option: -d Enable debugging mode. Verbose messages and all messages intended for syslog(8) will be sent to stderr, and powerd will stay in the foreground of the controlling terminal. -n Prevent execution of power management scripts. CONFIGURATION SCRIPTS
All configuration of powerd is encapsulated into scripts that are run when power management events occur. The daemon will look for the scripts from the directory /etc/powerd/scripts. Configuration scripts are run synchronously; powerd will start the script and wait for its completion before it handles the next event. Configuration scripts are called with different arguments, depending on the script class. These classes are described in the following sec- tions. POWER SWITCH SCRIPTS Power switch scripts are called when a state change event occurs on a power switch device. Power switch scripts are called with two argu- ments: the device with which the event is associated, and the event type. The following power switch script names are defined: power_button This script is called when an event occurs on a power button device. reset_button This script is called when an event occurs on a reset button device. sleep_button This script is called when an event occurs on a sleep button device. lid_switch This script is called when an event occurs on a lid switch device. acadapter This script is called when an online or offline event occurs on an AC adapter device. hotkey_button This script is called when an event occurs on a hotkey button device. The following events are defined for power switch devices: pressed The button was pressed, the lid was closed, or the AC adapter was connected. released The button was released, the lid was opened, or the AC adapter was disconnected. Note that power and sleep button devices usually do not post this type of event. The following is an example of how a power button script might be invoked when a power button is pressed by the operator: /etc/powerd/scripts/power_button acpibut0 pressed ENVSYS SCRIPTS envsys(4) scripts are called when a condition was triggered in a sensor. These scripts are called with three arguments: the device associ- ated, the event type, and the sensor's name. The sensor_drive and the sensor_battery scripts uses a fourth argument: state description. The following envsys script names are defined: sensor_battery This script is called when an event occurs on a battery sensor (Wh/Ah/Battery state). sensor_drive This script is called when an event occurs on a drive sensor. sensor_fan This script is called when an event occurs on a fan sensor. sensor_indicator This script is called when an event ocurrs on a indicator/integer sensor. sensor_power This script is called when an event occurs on a power sensor (W/Ampere). sensor_resistance This script is called when an event occurs on a resistance sensor (Ohm). sensor_temperature This script is called when an event occurs on a temperature sensor. sensor_voltage This script is called when an event occurs on a voltage sensor. The following events are defined for fan, indicator, power, resistance, temperature, and voltage sensors: critical A critical condition was triggered. critical-under A critical under condition was triggered. critical-over A critical over condition was triggered. warning-under A warning under condition was triggered. warning-over A warning over condition was triggered. The following event is defined for all scripts, but it is only sent if any of the previous events has been previously sent: normal A normal state/capacity/condition was triggered. The following events are defined only for battery sensors: user-capacity Capacity dropped below the limit set by the user. low-power System is running in low power. This implies that the AC adapter is disconnected and all batteries are in critical or low capacity. The script shutdowns the system gracefully by default. The following events are defined for drive and battery sensors: state-changed The state of the sensor has been changed and it is not in the normal state. The following is an example of how a temperature sensor script might be invoked when a critical over condition is triggered: /etc/powerd/scripts/sensor_temperature lm0 critical-over "CPU Temp" SEE ALSO
acpi(4), acpiacad(4), acpibut(4), acpilid(4), envsys(4), i386/apm(4) HISTORY
powerd first appeared in NetBSD 2.0. Support to handle envsys(4) events appeared in NetBSD 5.0. AUTHORS
powerd was written by Jason R. Thorpe <thorpej@wasabisystems.com> and contributed by Wasabi Systems, Inc. Juan Romero Pardines added support to handle envsys(4) events. BUGS
Due to its synchronous nature powerd cannot be trusted to handle events within a certain time. BSD
December 15, 2010 BSD
All times are GMT -4. The time now is 07:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy