For readability, here's a formatted and numbered version:
My guess is that in line 14 you're trying to assign a regular expression to a variable, and use that in the match below. To do that, you'd have to use the qr// construct, and it would be much more efficient to do that outside the loop, instead of each time again.
Other than that, you can probably do the same thing with a simple grep {}, eg
Hi Scripting Gurus, I am new bee in perl, and trying to write a script which must print the free disk space availability of C and E drives. Please advice.
Here is the script snippet and expected output:
#!/usr/bin/perl
use CGI qw/:html3 :standard/;
$spaceuselog =... (4 Replies)
I have a perl program that uses the mail program to send emails. It works fine but because I want to change the return address on the emails to be different I need to use mailx with the "-r" option. the problem is when I change this line to use mailx I no longer recieve "any" emails.
This works... (1 Reply)
Hey Guys,
I have some weird problem with printing scalars ...
When I'm executing script both are printing in terminal ...
But only one is printed to the file ?
I don't know whats going on .. :)
Btw .. I'm noobie :) took me lots of time to put this simple script together :)
Thank you... (3 Replies)
Long story short: I'm working inside of a Unix SSH under a bash shell. I have to code a C program that generates a random number. Then I have to call the compiled C program with a Perl program to run the C program 20 times and put all the generated random #s into a text file, then print that text... (1 Reply)
Hey guys i am using perl and trying to pull a list of books from a database and then populate the list in a separate TT2 file. When the list is generated there should be 39 book names. When I do the foreach statement in my tt2 below, the first statement gives me 39 Array(random number) and the... (1 Reply)
I got multiple of documents in which i have to extract a line coming after a ID..The scenario is
Customer ID: none
VT : 002/89
Customer ID: Yes
VT: 001/89
Customer ID: none
VT: 006/85
Customer ID: Yes
VT: 003/56
I have to extract the id which is coming after YES..The output... (7 Replies)
HI
I am trying to create a bash script to print whatever i type in
It has to have these below to define the size of the label and what size to print the text
N
q609
A100,10,0,5,2,2,N," "
P1
It has to be sent to below
> /dev/usblp0
So what it has to be is
Written... (12 Replies)
Hi
I have a file with number of entries
name 1 123
name 1 345
name 1 65346
name2 3243
name2 24234
name 2 234234
so on .........
how to count total number of entries for name 1 and name2...and so on Please guide. (1 Reply)
I created a program, so a kid can practice there math on it. It dispenses varies math problems and the kid must input an answer. I also want it to grade the work they have done, but I can't find the best place for it to print out the grade.
I have:
if ( $response =~ m/^/ ) {
$user_wants_to_quit... (1 Reply)
Discussion started by: germany1517
1 Replies
LEARN ABOUT REDHAT
gimp::feature
Feature(3) User Contributed Perl Documentation Feature(3)NAME
Gimp::Feature - check for specific features to be present before registering the script.
SYNOPSIS
use Gimp::Feature;
or
use Gimp::Feature qw(feature1 feature2 ...);
DESCRIPTION
This module can be used to check for specific features to be present. This can be used to deny running the script when neccessary features
are not present. While some features can be checked for at any time, the Gimp::Fu module offers a nicer way to check for them.
"gtk"
checks for the presence of the gtk interface module.
"gtk-1.1", "gtk-1.2"
checks for the presence of gtk-1.1 (1.2) or higher.
"perl-5.005"
checks for perl version 5.005 or higher.
"pdl"
checks for the presence of a suitable version of PDL (>=1.9906).
"gnome"
checks for the presence of the Gnome-Perl module.
"gtkxmhtl"
checks for the presence of the Gtk::XmHTML module.
"unix"
checks wether the script runs on a unix-like operating system. At the moment, this is every system except windows, macos, os2 and vms.
"persistency"
checks wether the "Gimp::Data" module (Gimp::Data) can handle complex persistent data structures, i.e. perl references in addition to
plain strings.
The following features can only be checked after "Gimp-"main> has been called (usually found in the form "exit main"). See Gimp::Fu on how
to check for these.
"gimp-1.1", "gimp-1.2"
checks for the presense of gimp in at least version 1.1 (1.2).
FUNCTIONS
present(feature)
Checks for the presense of the single feature given as the argument. Returns true if the feature is present, false otherwise.
need(feature,[function-name])
Require a specific feature. If the required feature is not present the program will exit gracefully, logging an appropriate message.
You can optionally supply a function name to further specify the place where this feature was missing.
This is the function used when importing symbols from the module.
missing(feature-description,[function-name])
Indicates that a generic feature (described by the first argument) is missing. A function name can further be specified. This function
will log the given message and exit gracefully.
describe(feature)
Returns a string describing the given feature in more detail, or undef if there is no description for this feature.
list()
Returns a list of features that can be checked for. This list might not be complete.
AUTHOR
Marc Lehmann <pcg@goof.com>
SEE ALSO perl(1), Gimp(1).
perl v5.8.0 1999-11-22 Feature(3)