On Dec 6, Daniel Falkenberg said:
>What if $string does not meet the criteria in s/[^a-zA-Z0-9]+//g; can I
>get a print statement to say...
>
>if ($string ne s/[^a-zA-Z0-9]+//g) {
> print "$string does not meet our criteria...! Please try another
>password\n";
>}
You mean, "how can I see if a s
List,
What if $string does not meet the criteria in s/[^a-zA-Z0-9]+//g; can I
get a print statement to say...
if ($string ne s/[^a-zA-Z0-9]+//g) {
print "$string does not meet our criteria...! Please try another
password\n";
}
Is this OK
Dan
-Original Message-
From: Jeff 'japhy
On Dec 6, Daniel Falkenberg said:
>$string =~ s/[^a-zA-Z0-9]//g;
>
>I take it only allows $string to eq anthing in the charcter class of
>a-z, A-Z and 0-9. I also take it that anything other than that will be
>stripped out? Any other comments?
Right. I'd write it as
s/[^a-zA-Z0-9]+//g;
fo
List,
Just a quick question of confirmation as to what the following REs
does...
$string =~ s/[^a-zA-Z0-9]//g;
I take it only allows $string to eq anthing in the charcter class of
a-z, A-Z and 0-9. I also take it that anything other than that will be
stripped out? Any other comments?
Regards
> Hey again all!
>
> $string = "attack. The password for $user_to_change should not have
> to be changed.\n".
> "-" x 70, "\n Hello".
> "Thank you for using our software.\n\n";
>
> Now I have been informed to replace the , with a . at the second line
> of the string near 70.
hope someone could help me out.
when the exit code returns 0, the page displays "Internal Server Error. The server
encountered an internal error or misconfiguration and was unable to complete your
request." but the fetchmail was done successfully.
$fetch = system ("/usr/bin/fetchmail -aK -f/tm
On Dec 6, Daniel Falkenberg said:
>$string = "\nHELLO WORLD!\n\n".
> "To $to, \n\n".
> "\n". "-" x 70, "\n Hello World".
> "Thank you for using our software.\n\n";
You have a , where you want a . instead. Using warnings would've picked
this up and told you that yo
Hey all,
$string = "\nHELLO WORLD!\n\n".
"To $to, \n\n".
"\n". "-" x 70, "\n Hello World".
"Thank you for using our software.\n\n";
My problem is that my variable $string dies or doesn't print (if you
wish :) ) anything after the 70,. Is there something I am do
--- Claude Jones <[EMAIL PROTECTED]> wrote:
> This is my first post, and I hope it's not too newbie even for a list with
> this name. I'm just beginning to learn Perl and I have successfully got some
> scripts working on our website to handle form submissions. We are in process
> of bringing our s
Not needed as part of core. Should have no problems on other systems. I run
on nt4, w2k and tandem w/ only minor changes going on in between.
Wags ;) ps The reason is the way the individual wanted the date printed. If acceptable
as to one you were, it is very small and compact.
-O
Hmmm..
I've seen these examples in books and previously on this list. I'm
surprised by the amount code it takes to display the current date.
On my script which outputs to html (i.e. a cgi script), I have the
following
$ltime = localtime();
print "$ltime\n";
Which prints: Wed Dec 5 17
On Wed, 5 Dec 2001, Chris Spurgeon wrote:
> perl -i.bak -npe 's/\r\n/\n/g'
You don't need to use -n and -p together, -p does the same as -n, but
prints the line.
-- Brett
http://www.chapelperilous.net/
--
This is my first post, and I hope it's not too newbie even for a list with
this name. I'm just beginning to learn Perl and I have successfully got some
scripts working on our website to handle form submissions. We are in process
of bringing our site in house, where we will host on a MIIS server.
C
This programs exists for Windows also.
--Ahmed
[EMAIL PROTECTED] | http://arbornet.org/~ahmed
On Wed, 5 Dec 2001, Sidharth Malhotra wrote:
> Most unix systems have a program called dos2unix that does the same
> thing.
> % man dos2unix
> % dos2unix sourcefile targetfile
>
> Hth. Sid.
>
>
Sho nuff.
Hell, for that matter, you can just blow them all away from within emacs.
Chris Spurgeon
Senior Design Technologist
[EMAIL PROTECTED]
ELECTRONIC INK
One South Broad Street
19th Floor
Philadelphia, PA 19107
www.electronicink.com
t 215.922.3800 x(233)
f 215.922.388
Most unix systems have a program called dos2unix that does the same
thing.
% man dos2unix
% dos2unix sourcefile targetfile
Hth. Sid.
-Original Message-
From: Chris Spurgeon [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 05, 2001 5:41 PM
To: 'Booher Timothy B 1stLt AFRL/MNAC'; [EM
perl -i.bak -npe 's/\r\n/\n/g'
where is the filename you want to clean.
A backup copy of your original file will be created in the same directory
with a ".bak" extension.
Chris Spurgeon
Senior Design Technologist
[EMAIL PROTECTED]
ELECTRONIC INK
One South Broad Street
19t
On Wed, 5 Dec 2001, Booher Timothy B 1stLt AFRL/MNAC wrote:
> I have what seems to be a persistent problem with all files that I import
> from dos into emacs. I have those control M's all over the place.
>
> Does anyone know of a perl script to 'clean' these files?
You can do this in one line:
#!/usr/bin/perl -i
while (<>) {
/\n/g;;
print $_;
}
--
Namaste,
Kristin
"The universe seems neither benign nor hostile, merely indifferent."
- Carl Sagan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I have what seems to be a persistent problem with all files that I import
from dos into emacs. I have those control M's all over the place.
Does anyone know of a perl script to 'clean' these files?
Thanks so much,
tim
Timothy B Booher, Lt US
It seems to me that this is more a function of the database than of Perl.
Standard SQL syntax (as far as I know) doesn't define how to join tables
between databases. Some databases, Oracle or Access for example, allow you
to link tables between one database and another, then you can just use
stand
Hey all,
I am pretty new with both PERL and MySQL and I have been asked to write
a report that will collect from our database how many users were dialing
from a specific area code in a given time. I am totally confused on
JOINS since the data I need to gather is in 2 separate databases. I was
ju
On Dec 5, Mark Anderson said:
> if ($str =~ /@A(.*?)@B(.*?)@C(.*?)@D(.*?)@E(.*?)@F(.*?)@END/s) {
> $var1 = $1; $var2 = $2; ...
> } else {
> print "Error message";
> }
>
>And it's stuffing most of $str into a sin
I have some data that is broken up by @s, stored in a string $str. I'm
using the following code:
if ($str =~ /@A(.*?)@B(.*?)@C(.*?)@D(.*?)@E(.*?)@F(.*?)@END/s) {
$var1 = $1; $var2 = $2; ...
} else {
print "Error mess
On Wed, 5 Dec 2001, Nguyen, Andy wrote:
> # $letter could be any letter from A to L.
> if ( $letter eq "A" || $letter "B" || $letter "C" || $letter eq "D" ||
>$letter eq "L" )
> {
> do something
> }
>
> I really don't want to repeat $letter for every letter (B-L).
I would use a r
my $day = 3;
$day = sprintf("%02d", $day); it assings $day to 03 if $day is less than
10
printf does the same but prints it instead of assigning it to the
variable
http://www.perldoc.com/perl5.6.1/pod/func/sprintf.html
http://www.perldoc.com/perl5.6.1/pod/func/printf.html
Etienne
Tyler Longre
it was already in my original reply
==
sub get_date {
my @months = qw(January Febuary March April May June July August
September October November December);
my ($day, $mon, $yr) = (localtime)[3,4,5];
return (sprintf("%02d", $day), $months[$mon], $yr + 1900);
}
my ($day, $month, $ye
I think there are currently no modules default in perl that do this, You
could try the Date::Calc module.
On Wed, 2001-12-05 at 15:07, Tyler Longren wrote:
> I'm not sure if there's a function to do that. But you could check the
> length of $DAY...if it's less than 2 you could just add a 0 infro
I'm not sure if there's a function to do that. But you could check the
length of $DAY...if it's less than 2 you could just add a 0 infront of it.
Good luck,
Tyler Longren
- Original Message -
From: "Torres, Jose" <[EMAIL PROTECTED]>
To: "'Shinagare, Sandeep'" <[EMAIL PROTECTED]>;
<[EMAI
In the code below, is there a Perl built-in function to pass $DAY into
so that a "9" comes out "09"? I need digits from 1 to 9 to be of the form
01, 02, etc. Ideas? Thanks.
-Jose
-Original Message-
From: Shinagare, Sandeep [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 05, 2001
On Mon, Dec 03, 2001 at 12:42:54PM +0100, Jenda Krynicky wrote:
> From: Michael Fowler <[EMAIL PROTECTED]>
> > This is a problem with your MTA (mail transport agent; e.g. sendmail,
> > postfix, qmail, etc.), i.e. $server. It's the MTA's job to remove the
> > header, not Mail::Mailer's.
>
> I don
Andy,
Try this:
if ( $letter =~ /^[A-L]$/ )
{ do something; }
You should be able to the same thing in ksh, just change the format a bit.
-Michael McQuarrie
--- "Nguyen, Andy" <[EMAIL PROTECTED]> wrote:
> Hi List,
>
> I am new to perl and looking for a shortcut way of doing this.
>
> # $lett
I have 2 directories:
x/y/z and a/b/c
within both directories, I have the same files say a1.c thro a10.c
I would like to write a perl script to go through all the files in each
directory and print out the filename if there is a difference between the
corresponding files.
I know of many ways
Thank you all for your help.
Andy
-Original Message-
From: Maurice Reeves [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 05, 2001 1:36 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Help with Perl
if ($letter =~ m/[A-L]/)
uses a regex which will give you what you want.
On Fri, Nov 30, 2001 at 02:21:53PM -0500, Ken Hammer wrote:
> our flag;
> sub alarm_handler
> {
> set flag;
> }
>
> set alarm to expire after 10 secs;
> Loop indefinitely {
> exit if ($flag);
> my $response = $ua->request($req);
> my $content = $response->content();
> }
This ought to get you started.
use Win32::NetAdmin;
GroupCreate(server, group, comment);
UserCreate(server, userName, password, passwordAge, privilege, homeDir,
comment, flags, scriptPath);
GroupAddUsers(server, groupName, users);
___
if ($letter =~ m/[A-L]/)
uses a regex which will give you what you want.
>From: "Nguyen, Andy" <[EMAIL PROTECTED]>
>To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
>Subject: Help with Perl
>Date: Wed, 5 Dec 2001 14:16:37 -0500
>Hi List,
>
>I am new to perl and looking for a shortcut way of doing th
Dag nabbit.. forgot the anchors :)
if ($letter =~ /^[A-L]$/) {
--
Hello Andy,
if ($letter =~ /[A-L]/) {
blah
}
See Also:
perldoc perlre
Cheers,
Kevin
On Wed, Dec 05, 2001 at 02:16:37PM -0500, Nguyen, Andy ([EMAIL PROTECTED])
said something similar to:
> Hi Li
Probably many ways to do this but one would be
if (($letter ge "A") && ($letter le "L")) {
do something
}
Chris Spurgeon
Senior Design Technologist
[EMAIL PROTECTED]
ELECTRONIC INK
One South Broad Street
19th Floor
Philadelphia, PA 19107
www.electronicink.com
t 21
Hello Andy,
if ($letter =~ /[A-L]/) {
blah
}
See Also:
perldoc perlre
Cheers,
Kevin
On Wed, Dec 05, 2001 at 02:16:37PM -0500, Nguyen, Andy ([EMAIL PROTECTED])
said something similar to:
> Hi List,
>
> I am new to perl and looking for a shortcut way of doing this.
>
> # $letter could
Hello,
I want to write a script for Win32 that :
- creates a users' group,
- adds users to this group.
Thanks for all hints, module, function names, ...
--
Ce qu'il y a d'enivrant dans le mauvais goût, c'est le plaisir
aristocratique de déplaire.
Charles Baudelaire - Mon coeur mis à nu.
-
Need a little help with file attributes. I am trying to query a remote file
to file out if is set with read-only attributes, if so I would like to
remove them. Any help will be appreciated. Here is the first part, but I
can't even get the value of the attributes.
!#D://perl//bin//perl -w
$serv
Jeff 'Japhy' wrote me this in a previous similar question:
<
You might be interested in the Quantum::Superpositions module, which
allows you to write:
if ($letter == any(A,B,C,D,...)) { ... }
>
Or maybe something like
if ($letter =~ m/^[A-Z]$/) {...}
HTH,
Etienne
"Nguyen, Andy" wrote:
>
--- "Nguyen, Andy" <[EMAIL PROTECTED]> wrote:
> Hi List,
>
> I am new to perl and looking for a shortcut way of doing this.
>
> # $letter could be any letter from A to L.
> if ( $letter eq "A" || $letter "B" || $letter "C" || $letter eq "D" ||
>$letter eq
> "L" )
> {
> do somethi
Hi List,
I am new to perl and looking for a shortcut way of doing this.
# $letter could be any letter from A to L.
if ( $letter eq "A" || $letter "B" || $letter "C" || $letter eq "D" ||
$letter eq "L" )
{
do something
}
I really don't want to repeat $letter for every letter (B-L
On Wed, 5 Dec 2001, Brett W. McCoy wrote:
> Technically, Perl only has two kinds of data types -- lists and scalars.
Actually, I would break that down even further into three types, scalars,
arrays (of scalars) and hashes (of scalars).
-- Brett
http://w
On Wed, 5 Dec 2001, Ruth Albocher wrote:
> I wish to use variables of type:
> double/long (but not float!)
> binary numbers and casting strings to binary
> unsigned integers(doubled would be better!)
>
> can somone point me in the right direction?
Technically, Perl only has two kinds of data typ
Well, Perl doesn't have these data types
explicitly (at least not yet) but what
you should look at are the two functions
Pack and Unpack.
Pack and Unpack take scalar variables and
convert them according to the format you
specify.
The man pages for them are quite in depth.
Hope that helps.
Take
hi all
I wish to use variables of type:
double/long (but not float!)
binary numbers and casting strings to binary
unsigned integers(doubled would be better!)
can somone point me in the right direction?
thanks
ruthie
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
exit works to get you out of the script.
- Original Message -
From: "Ahmed Moustafa" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, December 05, 2001 7:32 AM
Subject: Re: Loop
> Try using "last" instead of "break".
>
> - Original Message -
At 12:00 PM 12/5/01 +0330, nafiseh saberi wrote:
>do you know ...what is the acronym of "qw" that
>use in Object-Oriented ??
It stands for "quote words".
--
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
On Dec 5, Michael McQuarrie said:
>The "use strict;" requires the arguments to all be quoted. In the real
>script I am only using "use strict 'vars';". This way I can keep the
>syntax of calling the sub the same as I originally had. I would like to
>keep the "error_notify(e,p,x,"Message");" sy
There is more signature text than actual thread text in your posts..
Isn't it supposed to be <=4 lines? Or i'm referring to the wrong ML?
Etienne
[EMAIL PROTECTED] wrote:
>
> There are a number of date formatting routines available at
> http://search.cpan.org/.
>
> > -Original Message---
sub get_date {
my @months = qw(January Febuary March April May June July August
September October November December);
my ($day, $mon, $yr) = (localtime)[3,4,5];
return (sprintf("%02d", $day), $months[$mon], $yr + 1900);
}
my ($day, $month, $year) = get_date();
You need to "code" the conver
Try this.
$thisday = (Sun,Mon,Tue,Wed,Thu,Fri,Sat)[(localtime)[6]];
$thisdate = (localtime)[3];
if ($thisdate == 1 || $thisdate == 21 || $thisdate == 31) {
$thisdate .= "st";
} elsif ($thisdate == 2 || $thisdate == 22) {
$thisdate .= "nd";
} elsif ($thisdate == 3 || $thisdate ==
There are a number of date formatting routines available at
http://search.cpan.org/.
> -Original Message-
> From: Shinagare, Sandeep [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 05, 2001 11:27 AM
> To: '[EMAIL PROTECTED]'
> Subject: today's date
>
>
> Hi Folks!
> Trying to
File::Find
Or, if j:\foo\bar\logs has only 1 level of sub folders, use opendir on
that dir and read the contents, finding items that are also directories,
which you can then do another opendir on.
Luke
On Wed, 5 Dec 2001, Torres, Jose wrote:
> Hi,
>
> How do you traverse Windows directories i
Hi Folks!
Trying to get todays date and month... was able to find this...
#snip-start
use Time::localtime;
$tm = localtime;
($DAY, $MONTH, $YEAR) = ($tm->mday, $tm->mon, $tm->year);
#snip-end
this gives me the Day and Month in numbers.. anyway in which i
can get "Mon","Tue","Wed" and "Jan
You need to write a recursive function to scan your root dir and list all
the file and directories and do the same for each one of the sub
directories. Once you find the file you are looking for, return.
--Ahmed
[EMAIL PROTECTED] | http://arbornet.org/~ahmed
On Wed, 5 Dec 2001, Torres, Jose wrot
I think it does not matter it your system is Windows or *nix.
--Ahmed
[EMAIL PROTECTED] | http://arbornet.org/~ahmed
On Wed, 5 Dec 2001, Torres, Jose wrote:
> Hi,
>
> How do you traverse Windows directories in Perl? Let's say J:\foo\bar\logs
> has a variable number of folders, each of which I
Lookat File::Find which should do what you want? Here is one simple which just
prints all directories under a specified top directory:
use File::Find;
find(\&wanted, 'x:/start/directory'); # starting directory goes here
sub wanted {
print "$File::Find::name\n " if ( -d $_ );
On Wed, 5 Dec 2001, Shinagare, Sandeep wrote:
> #snip2
> $vfilename="TestFile.txt";
> system ("copy c:\msg.txt c:\sandeep\$vfilename");
> #end
Use \\ instead of \
\$ means '$'
\\ means '\'
- Flávio Soibelmann Glock
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
Hi,
How do you traverse Windows directories in Perl? Let's say J:\foo\bar\logs
has a variable number of folders, each of which I want to look into for a
specific file. How would I do this? Thanks for all help.
-Jose
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
Hello Michael,
Wednesday, December 05, 2001, Michael McQuarrie <[EMAIL PROTECTED]> wrote:
MM> Maxim,
MM> Correction:
MM> The "use strict;" requires the arguments to all be quoted.
yes.
MM> In the real script I am only using "use strict 'vars';". This way
MM> I can keep the syntax of calling t
Need to double your \ when working with ". SO your code should look somehting
like:
system ("copy c:\\msg.txt c:\\sandeep\\$vfilename");
Wags ;)
-Original Message-
From: Shinagare, Sandeep [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 05, 2001 07:16
To: [EMAIL PROTECTED]
S
On Wed, 5 Dec 2001, Purshottam Chandak wrote:
> $fred[1] .= "whatsis";
>
> Playing with this I have not found any difference between
> the .= (which I would expect to do concatenation),
> and the = (which I expect would do normal assignment.)
>
> Can someone explain what the .= is for?
It's the
Try using "last" instead of "break".
- Original Message -
From: "Purshottam Chandak" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 05, 2001 7:19 AM
Subject: Loop
> i was trying to work it out, for any kind of array.
> the following pseudo code doesn't seem to wor
$fred[1] .= "whatsis";
Playing with this I have not found any difference between
the .= (which I would expect to do concatenation),
and the = (which I expect would do normal assignment.)
Can someone explain what the .= is for?
Pc
_
Do
On Wed, 5 Dec 2001, Purshottam Chandak wrote:
> i was trying to work it out, for any kind of array.
> the following pseudo code doesn't seem to work
>
> for(.) {
> if(...) {
> ..
> }
> else {
>
> break;
> }
> }
>
> the break statement is not working. Even when it comes into
Maxim,
Correction:
The "use strict;" requires the arguments to all be quoted. In the real script I am
only using
"use strict 'vars';". This way I can keep the syntax of calling the sub the same as I
originally
had. I would like to keep the "error_notify(e,p,x,"Message");" syntax. The "q" is
Hello Purshottam,
Wednesday, December 05, 2001, Purshottam Chandak <[EMAIL PROTECTED]> wrote:
PC> i was trying to work it out, for any kind of array.
PC> the following pseudo code doesn't seem to work
PC> for(.) {
PC> if(...) {
PC> ..
PC> }
PC> else {
PC>
PC> break;
PC> }
P
On Wed, 5 Dec 2001, Shinagare, Sandeep wrote:
> #snip1
> system ("copy c:\msg.txt c:\sandeep\msg.txt");
> #end
>
> which works fine. But how can i give it a dynamic file name say like...
>
> #snip2
> $vfilename="TestFile.txt";
> system ("copy c:\msg.txt c:\sandeep\$vfilename");
> #end
>
> this do
- Original Message -
From: "Dermot Paikkos" <[EMAIL PROTECTED]>
> Hi there,
> This is both frustrating and embarrassing. I can't capture the
> following data into a variable. The line I want is:
> GIAZUC00
>
> I have tried a multitude of Regex, none seems to be working. Here's
> my last at
i was trying to work it out, for any kind of array.
the following pseudo code doesn't seem to work
for(.) {
if(...) {
..
}
else {
break;
}
}
the break statement is not working. Even when it comes into the else part,
it doesn't break the for loop.
Suggestions?
Pc
__
Maxim,
I have set "use strict;".
Below is a script to test the sub. As is the script should simply print "the script
didnt work".
If you change the last line of the following test script to:
error_notify(q,"the script didnt work");
It fails with this message:
Can't find string terminato
Hi,
Just trying to copy a file from one location to another like this.
#snip1
system ("copy c:\msg.txt c:\sandeep\msg.txt");
#end
which works fine. But how can i give it a dynamic file name say like...
#snip2
$vfilename="TestFile.txt";
system ("copy c:\msg.txt c:\sandeep\$vfilename");
#end
thi
> -Original Message-
> From: Booher Timothy B 1stLt AFRL/MNAC
> [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 05, 2001 9:27 AM
> To: [EMAIL PROTECTED]
> Subject: SIMPLE SCRIPT TO REMOVE ALL SPACE FROM THE ENDS OF LINES
>
>
>
> I am looking for a simple way to go through my text
On Wed, 5 Dec 2001, Daniel Falkenberg wrote:
> Please don't stree to much over this one but, is there an easier way of
> writing this?
>
> while(1){
> if ($status == 1) {
> #Do this sub...
> sub();
> elsif ($status == 1) {
> #Do this other sub...
> sub2();
> } else {
> #
I am looking for a simple way to go through my text file and remove all
spaces from the ends of lines. I have a feeling that this is real easy, but
don't know what function is best: does chomp do this? Is there a feature in
emacs that does this better?
Thanks for any information . . .
Tim, bran
Hello Michael,
Wednesday, December 05, 2001, Michael McQuarrie <[EMAIL PROTECTED]> wrote:
MM> I am defining a sub that takes only specific options:
MM> sub error_notify
MM> {
MM> my $ERR_USAGE = "error_notify (e,p,x, \"Message Text\")\n";
MM> foreach (@_)
MM> {
MM> if(/^e$/) {
> Can I do this using Date::Manip
Yes, I guess :)
>is there any other way
use Date::Tie;
tie %time, 'Date::Tie';
$time{epoch} = 36000;
print "$time{hour}:$time{minute}:$time{second}\n";
$time{epoch}++;
print "$time{hour}:$time{minute}:$time{second}\n";
$time{epoch}++;
print "$time{hour}:$time
I am defining a sub that takes only specific options:
sub error_notify
{
my $ERR_USAGE = "error_notify (e,p,x, \"Message Text\")\n";
foreach (@_)
{
if(/^e$/) { push @ERR_OPTS, "email"; }
elsif (/^p$/) { push @ERR_OPTS, "page";
Hello Dermot,
Wednesday, December 05, 2001, Dermot Paikkos <[EMAIL PROTECTED]> wrote:
DP> Hi there,
DP> This is both frustrating and embarrassing. I can't capture the
DP> following data into a variable. The line I want is:
DP> GIAZUC00
DP> I have tried a multitude of Regex, none seems to be w
Hello,
I'm currently working with using regexp to extract XML:
Try this:
open(F,"$i");
while (defined( $p = )) {
chomp($p);
# Change statement
if ($p=~ /^(.+?)/){
$code=$1;
print $code;
}
-Original Message-
From: Dermot Paikkos [mailt
# The program below does that, using RFC2445 rules,
# but they are not the weeks you expected.
# The output is:
# 20020316Z,20020317Z,20020318Z,20020319Z,20020320Z,20020321Z,20020322Z
# 20030628Z,20030629Z,20030630Z,20030701Z,20030702Z,20030703Z,20030704Z
# 20040904Z,20040905Z,20040906Z,20040907Z
Hi there,
This is both frustrating and embarrassing. I can't capture the
following data into a variable. The line I want is:
GIAZUC00
I have tried a multitude of Regex, none seems to be working. Here's
my last attempt:
open(F,"$i");
while (defined( $p = )) {
chomp($p);
($co
Hello Sandeep,
Wednesday, December 05, 2001, Shinagare, Sandeep <[EMAIL PROTECTED]>
wrote:
SS> Hi All,
SS> I am trying to learn Perl and want to begin with getting an interpreter for
SS> the Windows OS (NT).
SS> Which are the good ones around for download?
http://www.perl.com/pub/a/language/inf
Hello...
can anyone help? Can (and if so, how) you use perl and
mapbasic together? how do you imbed perl into mapbasic
and vice versa?
any assistance would be kool!
Ben
__
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://sho
Hello Andrew,
Wednesday, December 05, 2001, Andrew Clark <[EMAIL PROTECTED]> wrote:
AC> The subject says it all.
AC> R,
AC> AJFC
AC> Please CC replys, I'm not on the list.
perldoc -f require
perldoc -f use
Best wishes,
Maximmailto:[EMAIL PROTECTED]
--
To uns
Hi All,
I am trying to learn Perl and want to begin with getting an interpreter for
the Windows OS (NT).
Which are the good ones around for download?
Also, any pointers for basic tutorials?
Thanks a lot.
Sandeep
-Original Message-
From: Maxim Berlin [mailto:[EMAIL PROTECTED]]
Sent: 05 De
Hello Daniel,
Wednesday, December 05, 2001, Daniel Falkenberg <[EMAIL PROTECTED]> wrote:
DF> Please don't stree to much over this one but, is there an easier way of
DF> writing this?
DF> while(1){
DF> if ($status == 1) {
DF> #Do this sub...
DF> sub();
DF> elsif ($status == 1) {
DF>
> No need for Date::Manip or anything:
>
>
> $timestamp = 36059;
> $time = sprintf '%02d:%02d:%02d',
> $timestamp / 3600, ($timestamp/60) % 60, $timestamp % 60;
Jeez, that is exactly how it should be! I overlooked the obvious in search of
the exotic.
Thanks,
-tir
On Wed, 5 Dec 2001
GS> In the past, if I've let CPAN install a bundle for just about anything, it's
GS> also gone and tried to upgrade perl first which to put it bluntly shafts my
GS> box. I would like to avoid this while still making use of CPAN.
i believe that newer versions of the CPAN module don't have this
"
From: "Tirthankar C. Patnaik" <[EMAIL PROTECTED]>
> I have a set of timestamps, which are seconds since midnight.
>
> say, 36000
> 36001
> 36002
> .
>
> I'd like to convert them into the format:
>
> 10:00:00
> 10:00:01
> .
>
> Can I do this us
From: [EMAIL PROTECTED]
> Yeah. Use ->is the directive to include packages !
>
> like ex:-
>
> Use Net::CMD;
Of course with lowercase "U" and also "MD" :
use Net::Cmd;
Perl is case sensitive even in the names of modules. Even though
it might not seem to be so o
> $ perl -le'use Time::Local;
> my $time = timelocal(0,0,0,5,11,101);
> print scalar localtime($time);
> print scalar localtime($time + 36_000);
> '
> Wed Dec 5 00:00:00 2001
> Wed Dec 5 10:00:00 2001
>
>
Thanks a lot.
-tir
On Wed, 5 Dec 2001, John W. Krahn wrote:
> "Tirthankar C. Patnai
"Tirthankar C. Patnaik" wrote:
>
> I have a set of timestamps, which are seconds since midnight.
>
> say, 36000
> 36001
> 36002
> .
>
> I'd like to convert them into the format:
>
> 10:00:00
> 10:00:01
> .
>
> Can I do this using Date::Manip, failing, which, is
Hi all, I'm trying to install RT2 - perl helpdesk suite, but it depends on a
load of modules which it will automaticall install using CPAN (I believe) as
part of the install script. Is it possible to tell CPAN *not* to upgrade
perl in the progress.
In the past, if I've let CPAN install a bund
Nicole Liu wrote:
>
> I tried this:
> $line = " .\A[0] ( A[0] ) , .\B[0] ( B[0] ) , .\C[0] (
> C[0] ) , .\D[0] ( D[0] ) , ";
>
> $v = "A[0]";
>
> if ($line =~ /$v/) { print "got\n"; }
if ($line =~ /\Q$v/) { print "got\n"; }
perldoc -f quotemeta
John
--
use Perl;
program
fulfillment
--
To
Joe Slaven wrote:
>
> I have a time /date routine which displays time to the nearest second. Can
> anyone advise on how I can loop the sprint statement so that it appears on
> the same line each time, but with the seconds ticking over ie., only one
> line of display shows while the loop runs, ra
1 - 100 of 110 matches
Mail list logo