Hi All,
Please suggest with the steps to add number of available perl repositories
in PPM->edit->preferences->repository.
I also tried to add the same , but ended up with 401 Authorization required.
Thanks.
I want to subscribe to this perl forum
thanks,
Anitha
kevin,
To answer your question, the 'greb' in your code is just part of a
string, it won't produce any effect.
and if what you wish is to remove your own grep process, this command
might do the trick.
ps -ef | grep hald-runner | grep -v grep
Tor.
kevin liu wrote:
Hello everyone:
When
Hi Team,
I want a code snippet for retrieving the content in xcel sheet in a
variable.
Thanks in advance[?]
---
Anitha victor
<<328.png>>
if you want to apply this regex to a single file, using the -i option
(in place editing) might be the quickest way for you.
ie.
perl -pe "tr/[a-e]/[1-5]/g" -i
Tor.
cute wrote:
> Now i create a temp file to store changed content.
> is there a simple way to change file content without creating
http://en.wikipedia.org/wiki/Serialization
Serialization here refer to the action of translating a complex data
object into a simpler format. For example, translating an array [1,2,3]
into a text string "1,2,3".
Tor.
Practical Perl wrote:
I saw a paper about DB_File,
Three serializ
Hi, I am developing a program that sets passwd for any user but i dont want
the operator sets the passwd. I want to give it as a result of a function
[EMAIL PROTECTED] victor]$ perl passwd.pl victor1
#!/usr/bin/perl
$usuario=$ARGV[0];
$passwd="PASSWDGENERATEBYOTHERFUNCTION"
`sudo
I would like to print out these header using CGI.pm
Cache-Control: no-store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
doing
$cgi->header(-"Cache-Control"=>"no-store, no-cache, must-revalidate",
-"Cache-Control"=>"post-check=0, pre-check=0");
result in
That "-M" is a perl file test operator, it will take the string after it
as name of a file automatically.
Tor.
Paul Harwood wrote:
One question I have:
With this statement:
@files = sort { -M $a <=> -M $b } @files;
How does Perl understand that these are files and not just text entries?
Did
I'm Really interesting in this software , let me know if you find
A visual perl .
Regards
-Original Message-
From: Ned Cunningham [mailto:[EMAIL PROTECTED]
Sent: Friday, October 24, 2003 12:00 PM
To: [EMAIL PROTECTED]
Subject: Visual Perl
Hi Gurus,
I just finished up with a Perl progr
Hi list,
I have a bilingual dictionary in a file with the following format:
word1:sense1 sense2 ... senseN
word2:sense1 sense2 ... senseN
...
I'm doing a simple script which looks for a word and returns all the
possible translations. What's the faster (or the more efficient) way to do
that when
$TheOriginalString =~ s/$StringOrCharToRemove//g;
Tor.
Christian Calónico wrote:
>
> Hello.
> I need to know how to remove a substring from a string and a how
> to remove a simple character occurrence from a string. Thanks in advance!
> Christian.
>
> _
You need to pass the array to the function by reference, here's the fix.
&spin([EMAIL PROTECTED]);
sub spin
{
$arr = shift;
for (; $count > 0; $count--)
{
push(@$arr, $start++);
}
}
but if all you want to do is to populate your array with value between
1025 to 1035, here's a clean
In shell, you can use cp -r or rsync
I have never done such thing in perl, but this library might be what you
need.
http://theoryx5.uwinnipeg.ca/CPAN/data/File-DirSync/README.html
Tor.
Pankaj Kapare wrote:
>
> Hi,
>
> I want to copy whole directory structure and its containts(may be file and
This is what you need
http://theoryx5.uwinnipeg.ca/CPAN/data/IPC-Shareable/IPC/Shareable.html
Tor.
dan wrote:
>
> Hi
>
> Is it possible to share variables between 2 perl scripts running as 2
> separate processes? I've looked on CPAN but can't see any names that are
> obvious they do that kind
Mu... I have a quicker way, try this.
cat FileContainFileNames | xargs -n1 perl -pe "s/oldstring/newstring/g"
-i
Tor.
Richard Fernandez wrote:
>
> I just had a situation where I needed to replace one string with another
> string in 200 files.
> This is what I came up with, but I know there ha
#!/usr/bin/perl
BEGIN
{
$mod = "CGI";
unless (eval "use $mod")
{
warn "unable to install $mod $@\n";
}
}
I expected this to work ok, but to my surprise, when I execute it, I get
this :
[htsang@victor htsang]$ ./test.perl
unable to inst
Maybe we should bring this discussion out to a more appropiate list, but
anyways, have a look into this doc.
http://dev.zope.org/Wikis/DevSite/Proposals/RemoteAddrAndAccelerators
This is not perfertly reliable, but you might want to consider it.
Tor.
>
> Please bear in mind that this IP addr
how about using mod_status? it shows all the IP connected to the server.
Tor.
simran wrote:
>
> if (you are looking for connections that have come in over time) then
> look in the log file
> else if i you are looking for the ip that is current connecting to the cgi script
> you c
for ($x=0; $x < scalar(@amen); $x++)
Tor.
Robert Monical wrote:
>
> Hello,
>
> I'm away from my Perl book and hope one of you will help me.
>
> Would somebody please remind me how to make this line work
>
> for ($x=0;$x<$#{@amen};$x++){
>
> right now, the loop only executes once.
>
if (%hash){
$ do
}
Tor.
"NYIMI Jose (BMB)" wrote:
>
> Hello,
>
> If(keys %hash){
> #do ...
> }
>
> Could you suggest an other way, please ?
>
> Thanks in advance.
>
> José.
>
> DISCLAIMER
>
> "This e-mail and any attachment thereto may contain information which
you second @EXPORT_OK= statement reset the EXPORT_OK array, I believe
the correct syntex should be.
our @EXPORT_OK = qw(@T_AREA %T_IDS);
Tor.
Jerry Preston wrote:
>
> Hi!,
>
> I do not understand what I am doing wrong. I can pass an hash this way and
> not an array using the following:
>
>
If you have a linux box, It might be a better idea to employ the traffic
shapper that comes with the linux kernel instead.
Tor.
mod_perl wrote:
>
> hi all,
>In my Lan I have a linux proxy .How can i restrict the bandwidth
> cosumed by each user using perl .Which module i can use .
>
build a pm to store them.
Tor.
Brian Ling wrote:
>
> Hi All
>
> I have a main Perl program that needs to read in a config file that just
> sets some variable values, what is the best way to do this. The config
> file can be in any format I want such as:
>
> #!/usr/bin/perl
> my $var = 3;
> m
Just saw this package on the Oct-2 UsePerl newsletter, would anyone who
tried this share some comment on it? how is the performance compare to
a mod_perl setup?
Thanks.
Tor.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
use mod_rewrite.
Tor.
Jose Malacara wrote:
>
> Is there an easy way to hide ,or spoof, a URL when outputting to html with
> perl? For example if I was running a script in my cgi-bin directory, but
> wanted the URL to appear differently so as to hide location of my
> cgi-directory.
>
> For exam
the command 'sort' allow you to put in your own routine to do sorting.
%usernum = ("server.one.com" => "15",
"server.two.com" => "5",
"server.three.com" => "14",
"server.four.com" => "9");
@arr = sort {$usernum{$a} <=> $usernum{$b}} (keys %usernum);
print j
perl-5b6.tar.gz -
but following these links all resulted in "HTTP 404 - File not
found"
It seems that upgrading from 5.005_02 to 5.6.1 is inevitable, but this
process would require additional time and resources to recertify all
of our existing programs on 5.6.1.
Thanks,
-Victor
-
are you trying to get the localtime in readable format? if so try this
print scalar(localtime);
Tor.
[EMAIL PROTECTED] wrote:
>
> Hi
>
> I'm trying to get my script to recognize the date and time.
> I thought I had it but I keep getting errors all over.
>
> Please take a look and tell me
print chr(7);
Tor.
Connie Chan wrote:
>
> Hi all,
>
> I am trying to write a script for sound alarm function.
>
> I've tried use print "\a", but that goes too strange...
> the sound output goes out by my sound card. So
> would you tell if that's the normal result of print "\a" ?
>
> Actuall
Depending on which mail system you use, I know for qmail, you can setup
a .qmail file to instruct qmail to trigger a script when there's any
incomming email.
Tor.
Dan Fish wrote:
>
> I've got a perl script that reads a dozen or so various documents and data
> files and generates a custom repor
@ARGV
in your example
$ARGV[0] will be abc
$ARGV[1] will be def
...etc
Tor.
Mike wrote:
>
> If a program calls a perl script as follows: /tmp/perltest.pl abc def ghi
> jkl mno
>
> Is there a variable which would contain the arguments?
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> F
@array = split("", $card_no);
Tor.
Daniel Falkenberg wrote:
>
> Hey all,
>
> $card_no = "1234567901234567" # 16 digit number
>
> How would I go about splitting that number into an array?
>
> Regards,
>
> Dan
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-m
Try the alarm function.
Tor.
Darren Edgerton wrote:
>
> Hi,
>
> i want to set a timer around a system command, so that IF the command runs
> longer than x seconds
> send email to the sysadmin
> Note: i *DO NOT* want to kill the process - simply want to send a warning
> that it is taking longe
In my opinion, the balanace between theory and technique in the book is good, you
really can't expect a book about object oriented to be without any theory at all right?
I was very fresh on OO perl when I first read the book and I did found a lot of good
tips and advice from it. If you are too
You probably don't need a perl script for this, there's this command call wget
in linux which you can use to mirror a site, and using the -A option you can
make it download file with specified extention (gif, jpg..etc).
Tor.
Gary Hawkins wrote:
> Would like to save images to disk using their UR
Try this regexp.
s/###.*?###//g;
[EMAIL PROTECTED] wrote:
> hi
>
> i have a long text file. in this text file several strings of the form: ###
>filename.jpg ### are embedded.
>
> how should a regex look that takes following:
>
> ### filename.jpg ###
>
> and returns
>
>
>
> and the filen
emacs
michael wrote:
> Speaking of text editors, anyone know of a good one that has
> line #ing
> for W2K? Free, of course (I am a student).
>
> BTW - this is a list that is really worth reading. You guys
> (and you know who you are) are fantastic. Some of the
> explanations offered here are so
How about Berkely DB?
"Hughes, Andrew" wrote:
> I have been given the task to create a contest for which appox. 90,000
> people might be signing up(collected info: name, company, email, phone,
> address1, address2). Due to various reasons, I am not able to use a true
> database like mySQL to st
use LWP. it can be as simple as this :
use LWP::Simple;
print get("http://www.mit.edu";);
Tor.
yun yun wrote:
> if I want to read the real html file from web, such as
> http://www.mit.edu, should I use sock programming? and
> if then, how could I use,and where can I study this
> aspect? Thank
.. this might be what you are looking for.
http://www.indigostar.com/perl2exe.htm#download
kondreddy Rama koti Reddy wrote:
> Dear Friends,
> can u tell me, how can i create an executable
> file for the .cgi program on linux whihc
> is having perl and javascript statements.
>
> Thank
actually, most likely you are looking not just password checking but also session
management.
The easiest way is to take advantage of mod_auth which come with apache by default
(consult
this part of the apache faq for more detail
http://httpd.apache.org/docs/misc/FAQ.html#user-authentication)
o
if ( -s $dirpath ) { ...stuff...}
but i will like to know more information on the reception of the e-mail, or
information of the function that process this process
Any assistance would be greatly appreciated. Thanks
Victor Pezo
Check out CGI.pm, and one more thing, make sure your html form has the ENCTYPE
set to multipart/form-data.
Tor.
patrick wrote:
> hello.
> i'm a perl beginner.
>
> you know that bit in html ?
> well i need to make my website upload files
> and i only have cgi functionallity
>
> so i'll be doing
They are call backreferences, used in regular expression as buffer where
you can store pieces of the result collected in the regular expression.
eg. if you have this
"123 456" =~ /(\d*) (\d*)/;
$1 will equal to 123 while $2 will equal to 456
If you have the 'proramming perl' book from oreilly,
Have you checked the permission, could it be your Application being run as
somebody having no permission to write to the files you are trying to write to.
or if you happens to make use of shell command within your script, the PATH
variable could be missing from your application.
Hope this help
T
There is a big section in the Perl Cookbook( O'Reilly) that show you step
by step detail of how to create a daemon.
peter grotz wrote:
> hi all,
> I need a program to run like a daemon. it should do:
> look in a directory for some flag-files, if some exist the daemon
> should start other prog
try the unlink command.
Stéphane JEAN BAPTISTE wrote:
> How can I delete a file ?
>
> thanks
use the stat command.
[EMAIL PROTECTED] wrote:
> Hi,
>
> I would like to know if with a perl script you can get the size of a file ?
> I need to get all the size of 250 files on 250 computers ...
>
> thanx
put a nohup in front and a & at the end.
This will make your script immune to handup and run in background.
Tor.
[EMAIL PROTECTED] wrote:
> Which linux command i use to run a perl script that will stay running in my server
>even when i logout via telnet?
> Thanks
> > > 1) unless you have previously populated the db file, it will start off
> > > as
> > > empty.
> > >
> > > I guess, this is my most basic and pressing question. A file by the name
> > > mockalias exists which already has the usernames and e-mail addresses
> > > separated by :
> > > When I use
> 1) unless you have previously populated the db file, it will start off
> as
> empty.
>
> I guess, this is my most basic and pressing question. A file by the name
> mockalias exists which already has the usernames and e-mail addresses
> separated by :
> When I use the tie command, am I not pulli
1) unless you have previously populated the db file, it will start off as
empty.
2) $ALIAS is the reference to the hash, maybe you were trying to say print
%ALIAS?
and may I suggest a little loop like this :
foreach (keys %hash)
{
print "$_ :: $hash{$_}\n";
}
which will print the content
Try this instead
tie %ALIAS, "DB_File", "$filename", O_RDWR|O_CREAT, 0644, $DB_HASH;
"Prabhu, Vrunda P (UMC-Student)" wrote:
> I have an existing file, called mockalias that contains entries in the
> following format:
>
> username : e-mail address
> I want to use a hash %ALIAS to read the mock
The command line parameters are stored in the @ARGV array.
Tor.
Edd Dawson wrote:
> Hi,
>
> I wish to write a perl script that i can call from the command line
> and pass parameters to it in the call when running under unix, i.e
>
> perl perlscript parameter1 parameter2
>
> I don't seem to be
I have recently came across a mod_perl document that suggested Perl's
Method Interface is more 'memory friendly' compare to Perl's Function
Interface.
I'm not too sure I've got the meaning of this 'Method Interface' and
'Function Interface' correctly, is it referring to the procedural
function ca
shouldn't it be
if ($ENV{'HTTP_REFERER'} eq "")
?
Luinrandir Hernson wrote:
> ok, where did i go wrong now???
>
> ##
> ##set $previous site var.
> ##
> if ($ENV{'HTTP_REFERER'} = "")
>{$previous = "an unknown site"}
>else
>{$previous = "$ENV{'HTT
you can try rsync
"Vinay T.S." wrote:
> I wanted to know if there is any module or method in an existing module
> for
>
> a) transfer a directory tree from one machine to another
>
> I could use
>
> tar xvf - | rsh target_machine " cd ; tar
> cvf - )
>
> wanted to do this , using an existing m
58 matches
Mail list logo