On 10/26/2006 05:47 AM, perl pra wrote:
hi ,
I want to pass a command argument to perl script with double quotes ( );
below is my scenario
my xml file is something like this ..
root
reff
var1123/var1
var2this is my name/var2
/reff
reff
var1234/var1
var2this is others name
On 10/25/2006 06:12 AM, Mug wrote:
Hi all,
I don't know if that anyway I can know what should I pass back
from right hand side to left hand side, like :
my $x = qw/a b c d e / ; # so I have $x = 5
my ($x) = qw / a b c d e / ; # then I have 'a'
or like
$data = F ; # reads 1 line from file;
On 10/25/2006 06:45 AM, Ron Goral wrote:
Is anyone else receiving spam from this list? I use this email address only
for this list, so it must be originating from someone on it. Any ideas?
Spammers harvest e-mail addresses from mailing lists and their archives.
If this list is archived on
On 10/20/2006 06:35 AM, Ramprasad A Padmanabhan wrote:
I am getting warnings like ( when I run perl -wc )
Subroutine foo redefined at bar.pm.
I am sure these functions are not redefined anywhere. I would like to
trace the source of these warnings.
How do I do this.
BTW I am using perl 5.8.3
On 10/20/2006 07:16 AM, Luba Pardo wrote:
Dear all,
I am trying to write a script that reads in two or three consecutive lines
to process those. [...]
Do you want to show some sample data? Do you want to show what the input
data is supposed to look like and what the output is supposed to look
On 10/20/2006 05:35 AM, Xavier Noria wrote:
On Oct 20, 2006, at 11:54 AM, Chris Share wrote:
In the output of the following code there's a carriage return between
the $name variable and the !. Where is this coming from? Doesn't the
chomp get rid of this?
[...]
Looks like CGI.pm puts STDIN
On 10/19/2006 01:11 AM, Sayed, Irfan (Irfan) wrote:
I need to login on remote machine which is windows , and i think windows
doesent support ssh login unless ssh server installed.
Either i have to use VNC , remote desktop shairing etc.
I need to automate this using script.
Please help.
On 10/18/2006 12:14 AM, Dharshana Eswaran wrote:
Hi All,
I am a student who is working on Perl on my project.
I am a beginner in Perl.
I know how to read the data from files into a variable or array. I mean, i
know to read the data line by line into a varaiable or teh full file
contents into
On 10/14/2006 09:14 AM, Sara wrote:
Need to determine the .wav and mp3 file length not in bits or bytes, but in
minutes.
It's for a dictation recording service who needs to invoice the clients as per
the minutes of files uploaded to their servers.
I searched the CPAN but of no help.
Thanks,
On 10/14/2006 06:05 AM, Mike Blezien wrote:
Hello,
Hello
[ php script snipped ]
###
I've been trying to convert this to a Perl script with not much luck.
Was hoping to get some tips on how to convert this to Perl or a similar
On 10/14/2006 12:03 PM, Jesse Engel wrote:
[...]
when i would call $ftp-rget() i would get an error that said basically there
is no rget method
with net::ftp.
so my question is this: by using net::ftp::recursive, do you get all of the methods
[...]
Read the documentation for
On 10/14/2006 02:57 PM, Mike Blezien wrote:
Hello,
- Original Message - From: Mumia W.
[EMAIL PROTECTED]
To: Beginners List beginners@perl.org
Sent: Saturday, October 14, 2006 12:09 PM
Subject: Re: Automatied downloads
On 10/14/2006 06:05 AM, Mike Blezien wrote:
Hello,
Hello
On 10/13/2006 07:57 AM, Luba Pardo wrote:
Dear sir/madam:
I am trying to write a script to process to consecutive lines at a time and
compare elements of between two consecutive lines.
I don't understand this sentence.
I tried something like:
$i=0;
while (IN){
chomp;
@a1_s= split/\/,
On 10/13/2006 11:50 AM, Andrew Kennard wrote:
Hello all
We have recently moved to a new hosting company that also provides us with
an SSL service.
The scenario:
I have a form located at url http://www.mydomain.co.uk/myfolder/page1.htm
which on submission, uses a sub routine that opens the
On 10/13/2006 12:14 PM, I.B. wrote:
this is the problem:
use regular expressions to prove that word Bug
is in the 3 row from the end of table in the html tagged file:
shell cat file1.txt
[...]
Don't use regular expressions to parse HTML. Use an HTML parsing module
to parse HTML.
Now to
On 10/12/2006 10:55 AM, Gallagher, Tim F (NE) wrote:
From a subroutine I would like to return 2 separate arrays like this
sub TEST
{
@a = (a1,a2,a3,a4,a5,a6,a7);
@b = (b1,b2,b3,b4,b5,b6,b7);
return (@a, @b);
}
my(@lala,@baba) = TEST;
print @lala;
The problem is that @lala will
On 10/12/2006 11:23 AM, Moon, John wrote:
-Original Message-
From: Gallagher, Tim F (NE) [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 12, 2006 11:55 AM
To: Perl Beginners
Subject: Subroutine returning 2 arrays
From a subroutine I would like to return 2 separate arrays like this
On 10/11/2006 10:42 AM, Sami FANTAR wrote:
[...]
I have read the Data::Dumper related doc.
Including the part where it tells you how to substitute the correct
variable names for $VAR1,$VAR2,... ?
But, after having written your example, the output seems quite weird.
I got $VAR1,$VAR2, and
On 10/08/2006 12:15 PM, Shawn Hinchy wrote:
Thank you Mumia and Ovid. I appreciate both of your responses. I agree
with you Ovid, you make some very good points. The point I forgot to
include is that these variables are actually configuration-type
constants. I misnamed them by calling
On 10/07/2006 04:11 AM, Robin Sheat wrote:
I have the following to open a database:
my $dbh = DBI-connect(DBI:$dbconn, $dbuser, $dbpass) or
die Couldn't connect to db $dbconn: . DBI-errstr;
and then later I'm doing:
my $query=select user_id, preference from $opt{table};
On 10/05/2006 08:47 AM, Kevin Old wrote:
Hello everyone,
I have a set of web based admin tools that users in my company use to
update various pieces of a website. I've never been able to write
enough regexes, clean routines, etc. to clean out all of the bad
characters that users put in. The
On 10/05/2006 09:48 AM, Chad Perrin wrote:
On Thu, Oct 05, 2006 at 09:06:11AM -0500, Mumia W. wrote:
On 10/05/2006 08:47 AM, Kevin Old wrote:
Hello everyone,
I have a set of web based admin tools that users in my company use to
update various pieces of a website. I've never been able
On 10/05/2006 11:34 AM, Johnson, Reginald (GTI) wrote:
To piggy back off of this question... Is there a way to just list out
the modules you have installed?
Make sure that perldoc is installed on your system and do this at a
command prompt:
perldoc -q installed
--
To unsubscribe, e-mail:
On 10/05/2006 03:23 PM, RICHARD FERNANDEZ wrote:
if the user has never signed in and the admin never ran
passwd user passwd -f user and then that user never went into
make his/her password permenant then yes it would matter b/c
the passwd is not set.
I've gone in and set a passwd for the
On 10/05/2006 07:10 PM, RICHARD FERNANDEZ wrote:
From: Mumia W. [mailto:[EMAIL PROTECTED]
Does the webserver have the proper permissions to invoke that sudo
entry?
AFAIK, yes. I don't think it would be asking for a password if it
couldn't run the binary. It just doesn't seem to be pulling
On 10/03/2006 09:19 PM, J. Alejandro Ceballos Z. -JOAL- wrote:
The variables created during a cgi, are stored in some kind of hash,
like the %ENV enviroment variables?
I want to create in some points, a var dump of all variables existed, in
order to track errors.
Perhaps the
On 10/03/2006 11:37 AM, Derek B. Smith wrote:
returns true or false (1 or '') and in list
context it returns the
contents of any capturing parentheses in the
pattern.
The expression:
( $ptypeline =~ /movable.+(sine|geo|radial|ortho)/i
)[ 0 ]
is a list slice so the regular expression is in
On 10/02/2006 01:54 PM, Rob Dixon wrote:
Bryan R Harris wrote:
**
$ptypeline = #movableortProjortho0.0000.000;
($ptype) = ($ptypeline =~ /movable.+(sine|geo|radial|ortho)/i) ||
(missing);
print $ptype, \n;
On 09/29/2006 11:49 AM, Shiping Wang wrote:
Hi, I have a big array, I need re-arrange it then put into sub array,
after that do something on each sub array. I have a problem to
dynamically give sub array a name. Any help? Maybe I should use
anonymous array?
Thanks,
Shiping
Here is my code:
On 09/29/2006 12:15 PM, Derek B. Smith wrote:
--- D. Bolliger [EMAIL PROTECTED] wrote:
Derek B. Smith am Donnerstag, 28. September 2006
22:28:
Why not just specify a non-digit for the first
character:
my @a = ( 0 .. 9, 'a' .. 'z', 'A' .. 'Z');
my $password = join '', $a[ 10 + rand( @a - 10
On 09/29/2006 01:44 PM, Rob Dixon wrote:
Derek B. Smith wrote:
--- Mumia W. [EMAIL PROTECTED]
wrote:
What is the purpose of this program?
To generate a random 6 character string.
If the first character starts with a # then I just
ignore the new string and tell it to goto LABLE, b/c
for 0
On 09/29/2006 01:28 PM, Charles K. Clarkson wrote:
Derek B. Smith wrote:
: ## Below is better pratice ##
:
: sub getfile {
: my $filename = shift;
: open F, $filename or die open failed $!
: my $contents;
: { local $/ = undef; # Read entire file at once
:$contents = F; # Return
On 09/29/2006 02:24 PM, Shiping Wang wrote:
Hi Charles,
At 13:08 2006-9-29, Charles K. Clarkson wrote:
Shiping Wang wrote:
: Hi, I have a big array, I need re-arrange it then put into sub
: array, after that do something on each sub array.
How do you want to split it into sub arrays?
On 09/29/2006 04:08 PM, Alexander Sirotkin wrote:
What is the best module to use when writing web site interaction scripts ?
The script would have to login sending username and password and after
that follow a few links and do some more http posts.
Any suggestions ?
Thanks
WWW::Mechanize
On 09/28/2006 08:16 AM, Derek B. Smith wrote:
--- Derek B. Smith [EMAIL PROTECTED]
wrote:
I need to substitute a conversion using chr, but
have
failed on multiple attempts. Basically if the first
element contains a # then convert it. Will anyone
advise?
thank you
derek
#if first char is a-z
On 09/28/2006 12:04 PM, Derek B. Smith wrote:
**
The input data is a 6 character randomized string that
could start with a # such as 6FhJ9Z. If it does start
with a number then I need to convert this character
into its cooresponding alpha char, [a-z,A-Z].
On 09/26/2006 07:10 AM, elite elite wrote:
If i going to write a script with a standard input how
would it look like?My perl book don't talk about it.
Craig
If the perl documentation has been properly installed onto your
computer, you should be able to open a command prompt and type
On 09/24/2006 07:04 PM, David Gilden wrote:
Greetings,
I am having a little trouble understanding matching and getting the sub pattern
saved to a Var. so that I can do a munge. I want to take the line returns and change them into
pipe characters '|'
All data records start with a date i.e.
On 09/25/2006 06:47 AM, John W. Krahn wrote:
Mumia W. wrote:
On 09/24/2006 07:04 PM, David Gilden wrote:
I am having a little trouble understanding matching and getting the
sub pattern saved to a Var. so that I can do a munge. I want to take
the line returns and change them into pipe
On 09/24/2006 12:35 PM, chen li wrote:
--- Mumia W. [EMAIL PROTECTED]
wrote:
On 09/22/2006 07:50 AM, chen li wrote:
--- Mumia W.
[EMAIL PROTECTED]
wrote:
That redundancy allows you to use inheritance.
If
you have a class
Employee, with an expanded set of fields, this
method makes
On 09/23/2006 01:21 PM, RICHARD FERNANDEZ wrote:
Hi folks,
I'm trying to create an HTML form that will refresh itself based on user
input. In the POD for CGI it says that you can set the value of a named
parameter by using something like:
$query-param(-name='foo', -value='the value');
But
On 09/23/2006 07:07 PM, Rob Dixon wrote:
[...]
If you want to do what you said, and put everything up to the pipe into a
variable (scalar $tex?) then
/([^|]+)/;
$tex = $1;
[...]
No, you should always only use the match variables after you've
determined that the match was successful:
On 09/21/2006 07:08 PM, chen li wrote:
Hi all,
I read some sections in perltoot. In section
Autoloaded Data Methods I see some line codes as
following:
package Person;
use Carp;
our $AUTOLOAD; # it's a package global
my %fields = (
name= undef,
On 09/22/2006 02:58 AM, Mathew Snyder wrote:
[...]
my $mod_time = (stat($file))[9];
[...]
If $file is not in the current directory, this won't work.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On 09/22/2006 07:50 AM, chen li wrote:
--- Mumia W. [EMAIL PROTECTED]
wrote:
That redundancy allows you to use inheritance. If
you have a class
Employee, with an expanded set of fields, this
method makes it possible
to add the fields without having to modify each
method that uses them
On 09/22/2006 08:30 AM, chen li wrote:
Hi all,
I copy some codes from perltoot and write some lines
to see how AUTOLOAD works.
test.pl
#!C:/Perl/bin/perl.exe
use strict;
use warnings;
use Data::Dumper;
use Person;
my $obj=Person-new();
print $obj-name();
On 09/21/2006 04:52 AM, Saurabh Singhvi wrote:
Hi all,
The following code block
is written without strictures and warnings enabled. If you place these
lines,
use strict;
use warnings;
at the top of your program, you'll catch errors much more quickly. In
particular, use strict will
On 09/21/06 07:30, Mumia W. wrote:
Try the open command I wrote, and see if that works. I hope this helps.
s/open command/code/
No I didn't write the open command ;-)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org
On 09/21/2006 10:25 AM, Tony Frasketi wrote:
Hello list.
I'm getting the following error message when compiling the program
listed below ...
Bad name after c' at /test/test1.cgi line 22.
line 22 is ' s/%(..)/pack('c', hex($1))/eg;'
Need help in eliminating this error!
thnx
tony
On 09/20/2006 05:24 AM, SFantar wrote:
Hello
After searching the cpan.org site for mathematical modules, I did not
find a module which can display graphically
the result of a function.
I want to see a function curve displayed in a graphical window?
How can I make it possible in Perl?
Thanks
On 09/18/2006 10:11 AM, Emilio Casbas wrote:
Hi,
I have this script;
---
use File::Find;
$File::Find::no_chdir = 0;
find(\wanted, @ARGV);
sub wanted {
print $File::Find::name\n if(-d);
}
---
I want to do a directory search for a given ARG, but no a recursive
search,
On 09/18/2006 02:06 AM, Ken Foskey wrote:
I have a lot of files created by a (much too) complex script and the
user I am running with has a default group of 'staff' but I want all
files created to have clientgrp which we create to ensure that only
authorised people have access to a particular
On 09/14/2006 11:04 PM, Michael Alipio wrote:
Hi,
A log file contains several of these lines:
session.blablahbla
blablabla proto:6 blablabla srcip:90.0.0.1 blablabla
blablabla srcport:3243 blablabla dstport:23 blablabla
session.blablahbla
blablabla proto:6 blablabla srcip:90.0.0.1
On 09/15/2006 12:54 AM, ubergoonz wrote:
Hi,
I have a certain variables of emplyee number which comes in the format of
[a000] or [u000] {whereby 000 is some serial numbers}.
I would like to remove the enclosed [ ] see if it is belong to class
a or
u , i can do it as follow
On 09/15/2006 02:24 AM, john wrote:
Hi all
I have installed the GD::Graph module and I tried to run the example using
this code
[...]
my $graph = GD::Graph::chart-new(400, 300);
[...]
I haven't installed GD::Graph yet, but the description
provided by 'aptitude' doesn't describe a
On 09/15/2006 07:12 AM, sfantar wrote:
Hello All!
I would like to know how possible it is to create XML files from plain text
files.
I have a huge number of text files I want to convert into XML format.
Is there any Perl modules for this purpose?
[...]
XML::Simple can do it.
--
To
On 09/14/2006 01:18 AM, Xavier Mas i Ramón wrote:
Hi all!,
I'm trying to create a sorted (ASCII) hash file but get all time a syntax
error in line my $abreviatures{$clau} = 1; at $abreviatures{ --. Sure
is an stupid mistake but I'm not able to see it even checking with my
Learning Perl
On 09/14/2006 07:17 AM, John W. Krahn wrote:
Mumia W. wrote:
The my command doesn't work that way. You have to my the entire hash
like so:
...
my $abreviatures;
That is not a hash, that is a scalar. ITYM:
my %abreviatures;
John
Oops, thanks :-)
--
To unsubscribe, e-mail: [EMAIL
On 09/14/2006 09:20 AM, Derek B. Smith wrote:
[...]
sub zipit {
##-- Add all readable files below $oldir --##
##-- and write them into a file. --##
my $zip = Archive::Zip-new();
my $entry = $zip-addDirectory ($oldir/$word/)
or die Failed to add file for archive zip $!;
On 09/14/2006 06:47 PM, Bryan R Harris wrote:
Can someone explain this behavior?
% perl -e 'print -12.17**0.2, \n'
-1.64838295714428
% perl -e 'print (-12.17)**(0.2), \n'
-12.17% perl -e 'print ((-12.17)**(0.2)), \n'
nan%
Yes, the \n isn't getting printed for some reason on the 2nd two
On 09/12/2006 11:28 PM, James Marks wrote:
Hi folks,
I don't know if this is a Perl or UNIX problem and I'm hoping you can
help me figure that out.
I wrote a script that checks to see if the httpsd and mysqld processes
are running on my server and to log the results of those tests.
When I
On 09/13/2006 06:07 PM, James Marks wrote:
What turned out to work — although I haven't figured out why yet — is to
to use 'acx' rather than 'aux' and to include that within the single
quotes as in:
open PS, '-|', '/bin/ps acx' or die Cannot open pipe from ps: $!;
The above line results in
On 09/11/2006 05:58 PM, Robin Sheat wrote:
On Tuesday 12 September 2006 10:27, Rob Dixon wrote:
[...]
What may help is that LWP allows for a callback to be specified in the
get() call, so that the downloaded data can be passed in chunks to a
user-written subroutine as it arrives. Use
On 09/06/2006 04:02 AM, Wijaya Edward wrote:
Dear Experts,
I am looking for a really efficient way to compute a position weight matrix (PWM) from a set of strings. In each set the strings are of the same length. Basically PWM compute the frequency (or probabilities) of bases [ATCG] occur in
On 09/06/2006 09:49 PM, chen li wrote:
Hello all,
I need a regular expression to process some data but
get stuck. I wonder if anyone here might have a clue.
input:
my $line='group A 1 2 3 4';# separated by space
results:
my @data=(group A ,1,2,3,4);
As Adriano Ferreira said, you
On 09/06/2006 05:41 AM, Mumia W. wrote:
On 09/06/2006 04:02 AM, Wijaya Edward wrote:
Dear Experts,
I am looking for a really efficient way to compute a position weight
matrix (PWM) [...]
Although I'm sure that smarter posters than I will [...]
do it right.
Ugh, I forgot about Wijaya's
On 09/05/2006 12:50 AM, Michael Alipio wrote:
Hi,
I was running this command on my perl program,
open FLOWTOOLS, |/usr/bin/flow-cat $start |
/usr/bin/flow-nfilter -f filter.tmp -F $direction
|/usr/bin/flow-stat -Pf8 | le
ss or die $!;
It does output something on the screen when I run it
on
On 09/05/2006 03:47 AM, Andrew Kennard wrote:
Hi all
I'm looking for a good word counting module/sub routine
I've found this so far
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=562lngWId=6
but it counts things like the Item1,Item2,Item3 as one word
I've had a search
On 09/02/2006 08:09 PM, chen li wrote:
Dear all,
I paste some data into textarea in a CGI script and
use param('data')to retrieve the data. I want to pass
the data into an array but what I find is that I only
one dimensional array. Can someone here give me a
hand?
Thanks,
Li
data pasted into
On 08/31/2006 08:19 AM, Roman Daszczyszak wrote:
In my perl script, I have a global variable called
@excludedIPAddresses, [...]
my @excludedIPAddresses = qw# 192.168.0.142 192.168.3.118 #;#
[...]
local @excludedIPAddresses = @excludedIPAddresses;
[...]
When I run this, I get an error
On 08/31/2006 08:24 AM, Helen wrote:
- Original Message -
From: Charles K. Clarkson [EMAIL PROTECTED]
To: beginners@perl.org
Sent: Wednesday, August 30, 2006 10:16 PM
Subject: [Bulk] RE: Totally lost - need a starting point
Helen wrote:
I am starting from scratch again reading the
On 08/29/2006 08:23 AM, Sayed, Irfan (Irfan) wrote:
Hi All,
I need to use the split function in perl script.
* /vobs/apache_log4j
/usr/add-on/puccase_vob01/ccvob01/apache_log4j.vbs public (replicated)
Above line i need to split in following order
*
/vobs/apache_log4j
On 08/29/2006 09:06 AM, Ken Foskey wrote:
I have a daemon process that works but I am currently running it with
script.pl error.log 21
and I want to do the same thing without using the redirection,, remove
the human error when starting the program.
I can `open( STDERR, '', 'error.log') ...`
On 08/29/2006 11:05 AM, Patrick Rice wrote:
Hi all
I'd like some advice,
set up; Red hat Enterprise 4
Perl 5.8
I am trying to create a web page, which takes data from a file and
builds a graph with GD, these are then saved as pictures, I then use the
cgi script to call the pics using
On 08/29/2006 01:46 PM, Derek B. Smith wrote:
[...]
If I change $number to $word is obviously does the
copy correctly, but what is the point of
my $number = $subdir_for{$word};
???
Forget it. Do what works. :-)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
On 08/29/2006 10:40 AM, Sayed, Irfan (Irfan) wrote:
Hi All,
I have a following script in perl in which i am using awk command but it
is not getting executed properly.
# /usr/atria/bin/Perl -w
use strict;
use warnings;
my $fname = /tmp/checkvob_log;
open(FILE,$fname);
Check if
On 08/29/2006 06:52 AM, Hien Le wrote:
[...]
# Method 2
print( \nMethod 2\n );
my @bar2 = split( /([a-z]{5})/, $foo );# Captures white-spaces ?!?
[...]
The comments made by Dr. Ruud and John W. Krahn are correct.
Split is returning the empty strings between delimiter
segments in the
On 08/29/2006 06:32 PM, Ron McKeever wrote:
I am try to use part of someones elses code that creats the data file which
prints out like this:
ip|result|deptA|data
ip|result|deptB|data
ip|result|deptC|data
My goal instead of having all the data in one big file is to loop this and create a file
On 08/29/2006 05:02 PM, Dr.Ruud wrote:
Mumia W. schreef:
Hien Le:
[...]
# Method 2
print( \nMethod 2\n );
my @bar2 = split( /([a-z]{5})/, $foo );# Captures white-spaces
?!? [...]
The comments made by Dr. Ruud and John W. Krahn are correct.
Split is returning the empty strings between
On 08/29/2006 07:01 PM, Gregg Allen wrote:
Hi:
I would like to read a tab delimited text file created in Excel into a
2d array. I don't understand why the following doesn't work. The $i
and $j, along with the print statement, are only for debugging purposes.
It prints:
Can't use string
On 08/28/2006 08:37 AM, Derek B. Smith wrote:
All,
I am trying to run logic that will copy/delete 3
versions of log.\d+ files to their respective
directories. Because there are so many directories, I
have built a hash table instead of using a bunch of
if else conditions with reg exps.
On 08/26/2006 10:57 AM, jobst müller wrote:
[...]
first of - i have to explain something; I have to grab some
data out of a phpBB in order to do some field reseach. I
need the data out of a forum that is runned by a user
community. I need the data to analyze the discussions.
Use LWP::*
On 08/25/2006 02:58 PM, Michael Weber wrote:
Greetings, perlers!
Greetings, Michael.
[...]
# Now that we're done, redirect the user to an all done page...
print Location:
file:///Y:/Public_Info/IS/whitelist_done.html\r\n\r\n;
You can only redirect to web-servers. Redirection to
On 08/25/2006 04:26 PM, Jim Schueckler wrote:
Hi,
I need to remove all characters from a string except 'a'..'z', 'A'..'Z',
and '0'..'9'.
[...]
$newstring = $oldstring;
$newstring =~ s/[^[:alnum:]]+//g;
Everything that's not alphanumeric gets zapped to nothing.
HTH
--
To unsubscribe,
On 08/22/2006 11:24 PM, [EMAIL PROTECTED] wrote:
Hi all,
I used to do this on UNIX scripts ...
#!/usr/bin/ksh
vowels=a e i o u
for letter in $vowels
do
echo $letter
done
How do I do the same in Perl?
Is it possible to do this in Perl without having to put vowels into an array and
use
On 08/23/2006 01:03 AM, Bobby Jafari wrote:
[...]
Every TCL API instruction that I use, would create a handle of some sort
(i.e. a value that can be use to destinguish the call in a unique
fashion).
[...]
I don't know what you mean by this.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
On 08/23/2006 09:58 AM, Andrej Kastrin wrote:
Hi,
below is simple solution for union and intersection for a pair of arrays
(@a and @b). How to modify this example that I can calculate union and
intersection for each pair of n arrays.
You could turn your code into a function and call it
On 08/23/2006 04:43 PM, [EMAIL PROTECTED] wrote:
Hi all,
I found the following sed one-liner trick that strips out the spaces that I run
as follows:
sed 's/^[ \t]*//;s/[ \t]*$//' /tmp/file.txt /tmp/filea.txt
[...]
It's pretty much exactly the same except for the -pe:
perl -pe 's/^[ \t]*//;
On 08/23/2006 05:09 PM, [EMAIL PROTECTED] wrote:
[...]
Am guessing that I have to take out the array bit and just modify this line
here:
@match=grep{/$lookfor/[EMAIL PROTECTED];
But I am not sure how or what I should change it to. How do I tell grep to
search from a file instead of from an
On 08/23/2006 02:30 PM, zhihua li wrote:
Dear all,
now when I'm writing some perl script that needs to open some files, I
alwayse have to put the script in the same directory of these files, or
I'll have to give the full path to these files in my script. if I do not
do so, perl wouldn't be
On 08/21/2006 11:32 PM, Owen Cook wrote:
I am trying to get email addresses out of a Sylpheed address book. The
output of Dumper is;
$VAR1 = {
'attribute-list' = [
{}
],
'first-name' = '',
'uid' =
On 08/19/2006 02:19 AM, I BioKid wrote:
I have a simple - yet trivial problem -
I 2000 directory at /home2/foo/foodir/ .
I need to copy all files with extension *.atm and *.ali to another
directory
called temp (say /home2/foo/foodir/temp )
After that I need to run a program in each of this
On 08/18/2006 08:23 AM, Nath, Alok (STSD) wrote:
Hi Guys,
My question is can I create more that one form in the same page.
Yes
If yes , do I need to create separate cgi object for each form
or one object
for one page is sufficient.How do I design ? Which is advised ?
On 08/16/2006 04:35 PM, [EMAIL PROTECTED] wrote:
Hi all,
I have two database tables, one is local and one is on a WAN. They are supposed
to be in-sync but they at the moment, they are not. There are 8million+ plus
rows on this table.
I tried to do SELECT EMPNO FROM EMP WHERE EMPNO NOT IN (
On 08/14/2006 06:54 PM, SFantar wrote:
Hello everyone
I want to list all the Perl modules installed on my system. The script
below does it well.
Unfortunately, it displays the name of each installed Perl module twice.
How can I get rid of them? [...]
For me it only displays each module
On 08/13/2006 08:36 AM, Ken Perl wrote:
what's correct regular expression on extracting only NAME and
DESCRIPTION section from pod text file?
I have tried this, but failed!
perl -e '$c=`pod2text /data/WebGUI/lib/WebGUI/User.pm`;$c =~
s/(NAME.*)SYNOPSIS/$1/;print $c'
foreach $_ (`pod2text
(Re-directed to the list)
On 08/12/2006 05:44 AM, [EMAIL PROTECTED] wrote:
Hi Mumia,
Thanks for your tip, that's a good one ... just need to make
some more
modifications as below:
if ($path =~ m/\Q$ini{SOURCE_DIR$count}\E/i) {
$TARGET_DIR = $ini{TARGET_DIR$count};
} else {
$TARGET_DIR =
On 08/11/2006 01:13 PM, Adriano Allora wrote:
hi all,
I use use HTML::Entities; and the functions decode() and encode(), but
I'd prefer working with escape characters (egrave;, for example) than
working with exadecimal (or what they are: #143 for example).
Must I use a regexp to substitute
On 08/11/2006 10:51 AM, Kevin Viel wrote:
[...]
Second, is there a way to keep my code private, like providing only
the compiled program? [...]
I did a search on CPAN for Obfuscate, and
PAR::Filter::Obfuscate was returned. It's possible that PAR
from CPAN is what you need.
--
To
On 08/11/2006 09:37 PM, [EMAIL PROTECTED] wrote:
Hi,
I am writing a Perl script that reads some kind of INI file. I cannot use
Config::INI or install any new modules due to some restriction so am reading
the whole INI text file one line at a time and storing them into an array. Here
are what on
201 - 300 of 377 matches
Mail list logo