Read File::Find.
Some shell commands return 0 for success and others
for failure or some problem. The case with 'find' is
the same. If you are taking the return value then of
course you will get the numerical stuff.
--- Elanchezhian Sivanandam [EMAIL PROTECTED]
wrote: hi,
i want to
Here '?!\s?not' after 'null' means 'null' is not
followed by zero/one whitespace followed by 'not'. So
the $+ will get 'null'.
but if u want 'null knot' then write
$str=~m/(null\s?knot)/
here the result will be 'null knot'
--- RTO RTO [EMAIL PROTECTED] wrote: Hello
Friends,
I am confused and
set the PATH variable in your .loginrc file in home
directory.
--- David Rainsford [EMAIL PROTECTED] wrote: I am
trying to run GreyMatter on my Mac OSX machine.
However, I get the
following error:
Can't locate gm-library.cgi in @INC (@INC contains:
/System/Library/Perl/darwin
It may be the case that there is the first value that
is not visible that is the value is a null string.
Otherwise it should work.
--- Vincent Lee [EMAIL PROTECTED] wrote: Hello
All,
I've got a problem with the JOIN function
I've got a list of columns that gets returned from
the
on
www.perldoc.com or your system.
[4] Here @_ is the array (you are right about that
also). In this case you don't have to mention the name
of the array.
Regards
Dharmender Rai
--- montana [EMAIL PROTECTED]
wrote: I've been looking through the manual
perlboot. This
is a beginners tutorial
Montana ,
Read the ## part in ur attached mail below:
--- montana [EMAIL PROTECTED]
wrote: So looking at the following package:
{ package Horse;
@ISA = qw(Animal);
sub sound { neigh }
sub name {
my $self = shift;
$$self;
$mypid contains the status of the process not its pid.
--- [EMAIL PROTECTED] wrote: I've
written a script to search for all *.pid files
in a dir, then do
a cat on the file. The script will then use this
variable to kill the
process. The problem I'm having is that the
varibale is not
;
#system(kill $mypid);
}
exit;
sub wanted {
my $entry = $File::Find::name if -e;
push @dirstruct, $entry if (($entry ne '') ((
m/$ext$/) and (substr
$entry, 0, -4))); #This will only work with *.pid
}
-Original Message-
From: Dharmender Rai
[mailto:[EMAIL PROTECTED
perldoc -f grep
--- Javeed SAR [EMAIL PROTECTED] wrote: Hi
all,
What is the UNIX grep equivalent in perl?
For eg:
@vobs=`cleartool lsvob -s -host blrk4005a|grep
$vob_tag`;
here the grep is UNIX grep?
What about in perl is there any function equivalent?
Regards
j
block that mailing address.
--- Eric Pretorious [EMAIL PROTECTED] wrote:
Hi, Bruno:
Unfortunately, I don't have one laying around in my
inbox right now.
(The one that arrived right after I sent my original
inquiry!) When I do
get one, though, I'll forward it on to you.
Thanks!
There is no such pre-defined variable @$.
Its $@ which gives you the Perl syntax error message
from the last eval() operator.
Regards
Dharmeder Rai
--- Fogle Cpl Shawn B [EMAIL PROTECTED] wrote:
I created a simple little program to play my flac
files (see
http://flac.sf.net) randomly, this
Read the Hashed Part ()
--- Pravesh Biyani [EMAIL PROTECTED] wrote: Hi
can i pass the file variable in the function..
for eg.
$lofile = somefile;
and call the function
## The way you have defined file_read
## you should pass the handle of the file
## by opening it here
Well the thing will work but its useless because you
are not reading from the file here. You are applying
the while loop on a scalar instead of providing it
with the file desc that it needs for the logical
processing.
--- Daryl J. Hoyt [EMAIL PROTECTED] wrote:
You can pass in a variable it
Write the output from AppleScript in a file and from
that file your Perl Script can read the data. Also you
can invoke your Perl Script directly from AppleScript.
--- montana [EMAIL PROTECTED]
wrote: I am trying to combine the powers of
applescript and
perl to better search data on some
your string is not getting interpolated for $cmd2
bacause you are using `` instead of '' or . If you
want to use `` then don't use $cmd2 or split the
string into many.
--- Javeed SAR [EMAIL PROTECTED] wrote: Hi
All,
I am executing a command from command line, it
working fine,when i give
Yes you are right !!
Thanx
Dharmender Rai
--- John W. Krahn [EMAIL PROTECTED] wrote:
Dharmender rai wrote:
You can use defined() function by checking for the
first element.
No, checking the first element of an array will tell
you whether or not
the first element of the array
You can use defined() function by checking for the
first element.
#!/usr/bin perl
use strict;
use warnings;
my @arr=(); ## empty
my $ref=\@arr; ##
if(!defined ($ref-[0]) {
# do your work here
}
if (!define ($arr-[0]) {
# do your work
}
--- dan [EMAIL PROTECTED] wrote: or
if (!$array[0])
is how
var2 is is
var3 is that working?
It is working fine. Re-check your output.
Cheers
Dharmender Rai
--- Admin-Stress [EMAIL PROTECTED] wrote: I want
to make a script to print parameter-1,
parameter-2, and parameter-3.
Parameter-1 and parameter-2 just a SINGLE word.
Parameter-3 = string
your regexp for aBalt (aBalt*) is not correct. It is
taking into account aBaltimore also. Instead , you
should have written aBalt\.*
--- Zary Necheva [EMAIL PROTECTED]
wrote: Hi,
I have a file with this data:
..CITY/STATE. |aBalt., MD
..COUNTY. |aBALTIMORE
..CITY/STATE. |aBaltimore,
you would be interested in this :
[1]
http:[EMAIL PROTECTED]/msg00028.html
[2]
--- Admin-Stress [EMAIL PROTECTED] wrote: Hi,
Anyone know which module should I use to manipulate
text file (like /etc/passwd for example).
I meant, to read a line, search a string, deleting a
line, etc.
My
perldoc -f readdir
--- [EMAIL PROTECTED] wrote: Hello, All:
When using...
while ($x = readdir(DH)) {
# What came before $x?
# What will come after $x?
}
How can I look at the next item in the directory?
--
Eric P.
Sunnyvale, CA
--
To unsubscribe, e-mail:
start with Learning Perl and docs at www.perldocs.com
..
--- waytech [EMAIL PROTECTED] wrote: Hi,
I am new to perl. But my frist task in the
new company is to write a program using it.
The program is to prevent password protected
website from password sharing.
Such as
Read the name of the file from STDIN. Assign it to
some scalar variable. Using that variable, you can
open this file. You can have other scalar variable
that can be assigned the name of this file appended
with whatever you want (like _temp etc) and eiher
open it (if it is there) or create it.
try out
(\d+\.){3}(\d+)
but it won't take CIDR addresses and will not check
the validity of the addresses.
--- Griggs Rob [EMAIL PROTECTED] wrote:
Hi Guys,
The code below extracts an ip address from the
/var/log/maillog file in the
event of the line containing the words
first of all remove that '=' sign and use '==' . again
to compare the strings use 'eq'.
--- pravesh biyaNI [EMAIL PROTECTED] wrote: Hello
Here is a very simple prblem which unfortunatly i
am not able to solve.
I want to compare a character to a variable and do
accordingly. I am
using
/docs/man5/perlthrtut.5.asp
Cheers !!
Dharmender Rai
--- Angerstein [EMAIL PROTECTED] wrote: Hi,
a simple question:
if my program starts a thread, does it wait until
the thread finishes or do
it run futher?
Other harder question:
if I fill an array or other complex datastructure
you can try out : use, require and eval
--- Cricker [EMAIL PROTECTED] wrote:
This seems like a stupid question... but I've looked
in lots of places and
can't figure it out.
I'd like to break my perl script into several files
(because it is getting
awfully large, with all the callbacks
that
data to be deleted in a data structure, set your file
pointer to the start of the data to be deleted and
write those contents.
Cheers !!
Dharmender Rai
--- Steveo [EMAIL PROTECTED] wrote: Thanks to
the people on this list I've been able to
create a form
submission page that writes team data
assign the reference of the hash.
--- Simon Tomlinson [EMAIL PROTECTED] wrote:
Hi
I want to put a hash into each element of an array.
I do it like the following bit of code. When I
iterate round my hash before putting it in the array
of the hash values/keys are there. However, when I
use warnings;
use strict;
my @arr=(1,2,3);
print orig,@arr,\n;
@arr=(); # clear the array
print now,@arr,'\n;
--- [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi
Suppose i have an array a[0]=1,a[1]=45,a[3]=78
Is there a way to clear the @a array with just one
command? so i can for
example
go for [1] Learning Perl
[2] Programming Perl
Both are published by Oreilly
--- [EMAIL PROTECTED] wrote: Hello
I ordered a book(Perl Object Oriented Programming by
Damian Conway) to
learn Perl from scratch. But I'm not sure whether it
is right to begin
learning Perl with the Object
$file_out='my_file';
system(/bin/grep -i errors $file_out);
The above script will give you all the occurrences of
the word you wanted. I have run it on SunW,
Ultra-2,5.7 sparc.
--- Nikola Janceski [EMAIL PROTECTED]
wrote: Has anyone run into something like this?
Specs: solaris 5.6 sparc,
it will confuse patch_gd.pl as
patch command.
Cheers
Dharmender Rai
--- Ebaad Ahmed [EMAIL PROTECTED] wrote: Hi
David,
I got this error when ran the patch_gd.pl, looks
like its looking for a
patch file.
# perl patch_gd.pl
patch: Invalid options.
patch: Usage: patch [-blNR] [-c|-e|-n
you are not reading the files properly.
use 2 while loops. the outer for traversing the
command line args while the inner for reading and
checking the file contents. use break in the inner
while loop when you get a blank line to go to the
outer while loop.
cheers
--- Harry Putnam [EMAIL
:\cygwin\usr\local\bin\perl.exe: *** m.AllocationBase 0x0,
m.BaseAddress 0x6168, m.RegionSize 0x34, m.State 0x1
thanx
Dharmender Rai,
IncrediMail -
Email has finally evolved
35 matches
Mail list logo