Hi,
my ($str) = "HI, HELLO, GREETINGS";
my ($reg) = "(BYE|HI|CIAO)";
if ($str =~ /$reg/)
{ print "Exists in $str\n"; }
The above code, will return true if BYE, HI or CIAO exists
in $str.
I want a regex to be put in $reg, which will return true
if neither BYE, HI nor CIAO exists in $str.
Carlos Diaz wrote:
>
> Can anyone explain in simple terms the difference between the three (my,
> our, local). Especially the difference between my and local. Thanks...
local is a leftover from pre-Perl5 versions. It is used on package
(global) variables and does not define them it only affects
It's a pgp [Pretty Good Privacy] signature file--used to assure that this post is
indeed from:
Mat Harris OpenGPG Public Key ID: C37D57D9.
Netscape Messenger 4.x doesn't seem to know what to do with it when I try to open it..
The plug-in finder found no appropriate plug-ins,
Thank you all for your replies,
>Play around with *FILEHANDLE. For example:
>open FILEHANDLE, ">blah.txt";
>&closeFile( *FILEHANDLE );
>sub closeFile {
> my $fh = shift;
> print $fh "I closed you.\n";
> close $fh;
>}
Still I was not able to delete the file.
>you don't need to lock the fi
Hi all,
I have the following bit of code that works out the directory path to
the currently executing script.
My $path = $0;
$path =~ s#(^/.+/).+$#$1# ;
This works but doesn't make me happy, is there a better way?
Thanks
Brian
BBCi at http://www.bbc.co.uk/
This e-mail (and any attachment
The problem is that you this lock is not mandetory, if you really really
want to lock the file, you have to set mendatory lock's. You have to setup a
system in which a user will be able to delete/create a file. you can setup
semaphore scheme.
Mark
- Original Message -
From: "Mkrous" <[EM
C:\>perldoc File::Basename
NAME
fileparse - split a pathname into pieces
basename - extract just the filename from a path
dirname - extract just the directory from a path
SYNOPSIS
use File::Basename;
($name,$path,$suffix) = fileparse($fullname,@suffixlist)
fi
my $path=`pwd` on *nix
my $path=`cd` on win*
- Original Message -
From: "Brian Ling" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 21, 2003 4:25 AM
Subject: Path to script
> Hi all,
>
> I have the following bit of code that works out the directory path to
> the cur
Have a look to :
http://search.cpan.org/author/LIBERTY/Cwd-2.06/Cwd.pm
José.
> -Original Message-
> From: Mark Goland [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 21, 2003 10:42 AM
> To: Brian Ling
> Cc: perl
> Subject: Re: Path to script
>
>
> my $path=`pwd` on *nix
> my $pat
Thanks for that,
I'll go with the File::Basename option as I may need to change the 'pwd' by the time
the call is made.
Brian
-Original Message-
From: NYIMI Jose (BMB) [mailto:[EMAIL PROTECTED]]
Sent: 21 January 2003 09:48
To: Mark Goland; Brian Ling
Cc: perl
Subject: RE: Path to scri
Dear All,
I'm greatly overwhelmed by your quick help to my problem.
Here's the corrected code:
#!/usr/bin/perl -w
use strict;
# filename: reverse_string.pl
# editor: # VIM - Vi IMproved 6.1
# description: get user input and reverse input
print "Please enter any string, to quit press Ctrl-Z:\
> -Original Message-
> From: Brian Ling [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 21, 2003 10:59 AM
> To: NYIMI Jose (BMB); Mark Goland
> Cc: perl
> Subject: RE: Path to script
>
>
> Thanks for that,
>
> I'll go with the File::Basename option as I may need to
> change the 'pw
"Brian Ling" wrote:
> Hi all,
>
> I have the following bit of code that works out the directory path to
> the currently executing script.
>
> My $path = $0;
> $path =~ s#(^/.+/).+$#$1# ;
>
> This works but doesn't make me happy, is there a better way?
If you're doing other path manipulation in the
Brian Ling said:
> Thanks for that,
>
> I'll go with the File::Basename option as I may need to change the 'pwd'
> by the time the call is made.
What you really want is the FindBin module.
perldoc FindBin
>> > I have the following bit of code that works out the
>> directory path to
>> > the cu
"Eri Mendz" <[EMAIL PROTECTED]> wrote in message
3E2D45F0.14555.14A0579@localhost">news:3E2D45F0.14555.14A0579@localhost...
> chomp(my @input = );
> my $total_elements = scalar(@input);
Assigning to a scalar variable puts the right-hand-side in scalar
context anyway.
my $total_elements = @in
Yep I did really want FindBin, as I did not know the possible problems with $0,
-Original Message-
From: NYIMI Jose (BMB) [mailto:[EMAIL PROTECTED]]
Sent: 21 January 2003 10:13
To: Brian Ling; Mark Goland
Cc: perl
Subject: RE: Path to script
> -Original Message-
> From: Brian
Eri Mendz wrote:
>
> Dear All,
>
> I'm greatly overwhelmed by your quick help to my problem.
> Here's the corrected code:
>
> #!/usr/bin/perl -w
> use strict;
>
> # filename: reverse_string.pl
> # editor: # VIM - Vi IMproved 6.1
> # description: get user input and reverse input
>
> print "Plea
Thanks Jose!
I have the hash created and now can see the values
using Data::Dumper but now I an having trouble walking the hashtree.
Trying to walk back out to each leaf value in the tree.
Hash def
$time=>{$custname}{$custsub}{$site}{$YYMMDDay}{'start'} = $hhmmsss;
This doesn't seem to get any
or
#! /usr/bin/perl -w
use lib qw(/path/to/your/stuff)
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, January 20, 2003 4:14 PM
Subject: RE: Adding new path to @INC
Sure.
#!/usr/local/bin/perl
BEGIN {
unshift (@INC, "Your/p
Kevin Old wrote:
have noticed that the perldoc command isn't availableI've looked for
Doesn't that one use man ?
man html::parser
etc.
--
Alan.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
...already searched cpan.
Has anybody an idea where I can get the Modul or Methode IO::Getline or
IO::Getlines
Are they only in Perl 5.8?
(I am using 5.0)
Thx,
Bastian
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi all,
I am new to perl and I try to remove file with it,
but I don't known how :(
I find modules File::Copy, File::Find, but not File::Delete :(
How can I do this ?
Peter
***r-e-k-l-a-m-a**
Chcesz oszczedzic na kosztach obslugi bankowej ?
mBIZNES - konto dla fi
C:\>perldoc -f unlink
unlink LIST
unlink Deletes a list of files. Returns the number of files
successfully deleted.
$cnt = unlink 'a', 'b', 'c';
unlink @goners;
unlink <*.bak>;
Note: "unlink" will not delete director
I just set up a new pc. For some reason I am getting double mail from
the list. Any ideas? It not just the mail where "my" email address is in
the header but every single message period.
Paul
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Was a double filter. Fixed.
-Original Message-
From: Paul Kraus [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 21, 2003 8:22 AM
To: Perl
Subject: Duplicate Mail
I just set up a new pc. For some reason I am getting double mail from
the list. Any ideas? It not just the mail where "my"
On Mon, 20 Jan 2003 21:11:56 -0600, "Carlos Diaz" <[EMAIL PROTECTED]> wrote:
> Can anyone explain in simple terms the difference between the three (my,
> our, local). Especially the difference between my and local. Thanks...
>
> CD
I know you ask
> Hi,
>
> my ($str) = "HI, HELLO, GREETINGS";
> my ($reg) = "(BYE|HI|CIAO)";
>
> if ($str =~ /$reg/)
> { print "Exists in $str\n"; }
>
> The above code, will return true if BYE, HI or CIAO exists
> in $str.
> I want a regex to be put in $reg, which will return true
> if neither BYE, HI n
Thanks for tips posters..
"John W. Krahn" <[EMAIL PROTECTED]> writes:
> You should _always_ verify that the file opened successfully.
>
> open(FILE,">somefile") or die "Cannot open 'somefile' $!";
Not being argumentative here but I've seen this said before. Not
really sure why it is import
You should always perform all error checking in any language to ensure
that your program, if it fails, declines gracefully. One of the
greatest shortcomings of C is that error checking is entirely manual,
and you simply must, in every real-world application, check the return
value of almost ev
Great article. Cleared up all of my confusion. However it did not touch
on "our". Anyone care to explain what its used for.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 21, 2003 8:40 AM
To: Carlos Diaz; [EMAIL PROTECTED]
Subject: RE: My, ou
"John W. Krahn" <[EMAIL PROTECTED]> writes:
> You should probably be using POSIX::strftime instead which is simpler
> and faster.
>
> use POSIX 'strftime';
>
> print FILE strftime( "An extra numeral <%D %T %w> appears\n",
> localtime );
Probably coming off like some kind of carpy here but I'm
"John W. Krahn" <[EMAIL PROTECTED]> writes:
> You shouldn't use ampersands unless you need the different behavior they
> provide.
John,
I asked for a documentation pointer on this in a previous post that
hasn't hit the server here yet, but don't bother with that please. I
found the info in perlf
strftime is an interface to a C function of the same name. It's a
fairly common function in many applications that have to deal with dates
and times. You may not need it here, but it's not a bad idea to get a
little familiar with it. For the life of me, I can't ever remember all
the format c
Ben Siders <[EMAIL PROTECTED]> writes:
> You should always perform all error checking in any language to ensure
Well thanks Ben. That was nice full explanation and makes a lot of sense.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Paul Kraus wrote:
> Maybe I am misunderstanding but that seems to be the exact same thing
> my does.
No. my() creates a new variable. our() refers to a global variable.
Try this:
use strict;
print "Global \$main::foo is at ", \$main::foo, "\n";
our $foo = 'One';
print "a: addr=", \$foo,
Paul Kraus wrote:
> Great article. Cleared up all of my confusion. However it did not
> touch on "our". Anyone care to explain what its used for.
Hi Paul.
An 'our' variable has the same visibility as a 'my' variable declared
in the same place, i.e. through to the end of the current lexical
scope
Hi all,
i have head that switch is introduced from perl 5.8. what are all the
other new additions to the perl???
enlighten me --
km
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
> Hi all,
>
> i have head that switch is introduced from perl 5.8. what are all the
> other new additions to the perl???
For a complete list of changes, go to:
http://dev.perl.org/perl5/news/2002/07/18/580ann/perldelta.html
Alan
--
To unsubscribe, e-mail: [EMAIL PROTE
I appreciate the input on my recent post for comparing apples and oranges.
Got it working great! Thanks. Now for some more food.
I have a directory: food. In the directory, there are three files: apple,
carrot, pecan. Each file has three descriptions each. Apple has: fruit red
round (as its three
> I appreciate the input on my recent post for comparing apples
> and oranges. Got it working great! Thanks. Now for some more food.
>
> I have a directory: food. In the directory, there are three
> files: apple, carrot, pecan. Each file has three descriptions
How are the descriptions formatte
Hi -
How do I get the current package name? For example,
if I have a module that starts with:
package Beau::Cool::Stuff;
...
and I want to give an error (die) later in this module:
...
die "invalid stuff passed to Beau::Cool::Stuff::function\n";
...
where is the 'package name variable' so I do
__PACKAGE__
3rd Camel, page 68, Literals
http://danconia.org
On Tue, 21 Jan 2003 08:15:09 -1000, "Beau E. Cox" <[EMAIL PROTECTED]> wrote:
> Hi -
>
> How do I get the current package name? For example,
> if I have a module that starts with:
#hello, is there a way to split a string between a digit and character
#without losing the digit or the character
#Any help would be very appreciated
$string='hello...4546perl...2366Pogrammers..3435'; #e.g. would make three new
strings
@newstrings=split(/(\d)([a-zA-Z])/,$string);
On Tue, 21 Jan 2003 08:15:09 +, Beau E. Cox wrote:
> How do I get the current package name? For example,
> if I have a module that starts with:
It's in
__PACKAGE__
Greetings,
Janek
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Wed, 22 Jan 2003 02:46:27 +0800, Justino Berrun wrote:
> #hello, is there a way to split a string between a digit and character
> #without losing the digit or the character
> #Any help would be very appreciated
>
> $string='hello...4546perl...2366Pogrammers..3435'; #e.g. would make three
"...
foreach(1..$total_elements){
print "\t\[$_\] my $input[$_ - 1 ]\n";
}
...Why did scalar $input in the foreach loop
"works" without predeclaring it with my?" --Eri
HI Eri,
The my is probably not doing what you think it is. Otherwise it would constitute a
redeclaration error. My guess
justino berrun wrote:
> #hello, is there a way to split a string between a digit and character
> #without losing the digit or the character
> #Any help would be very appreciated
>
> $string='hello...4546perl...2366Pogrammers..3435'; #e.g. would
> make three new strings
>
> @newstrings=split(
What would be the best method to parse the following DN? I just want the
first part of this DN so I can create a server list into an array
(EX-MSG-01, EXMSG-02 etc). I've tried using SPLIT but I am not sure how
to get the first part of the text I want. Any help appreciated.
CN=EX-MSG-01,CN=
__THANKS__ ;)
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 21, 2003 8:27 AM
> To: Beau E. Cox; 'Beginners
> Subject: RE: Current package name
>
>
> __PACKAGE__
>
> 3rd Camel, page 68, Literals
>
> http://danconia.org
>
>
> -
R. Joseph Newton wrote:
> "...
> foreach(1..$total_elements){
> print "\t\[$_\] my $input[$_ - 1 ]\n";
> }
> ...Why did scalar $input in the foreach loop
> "works" without predeclaring it with my?" --Eri
>
> HI Eri,
>
> The my is probably not doing what you think it is. Otherwise
> it would
Beau E. Cox wrote:
> Hi -
>
> How do I get the current package name? For example,
> if I have a module that starts with:
>
> package Beau::Cool::Stuff;
> ...
>
> and I want to give an error (die) later in this module:
>
> ...
> die "invalid stuff passed to Beau::Cool::Stuff::function\n"; ...
>
Paul Harwood wrote:
> What would be the best method to parse the following DN? I just want
> the first part of this DN so I can create a server list into an array
> (EX-MSG-01, EXMSG-02 etc). I've tried using SPLIT but I am not sure
> how to get the first part of the text I want. Any help appreciat
Can you define a list with my?
I tried
my ($var1, $var2) = 'something','something else';
I have also tried
my ($var1, $var2 = 'something','something else');
Thanks.
Paul
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
" ...
> open(FILE,">somefile") or die "Cannot open 'somefile' $!";
Not being argumentative here but I've seen this said before. Not
really sure why it is important. I mean why is the open action
singled out for this protection. It seems other actions could also
cause a misfired script?
..."
Harry Putnam wrote:
>
> "John W. Krahn" <[EMAIL PROTECTED]> writes:
>
> > You shouldn't use ampersands unless you need the different behavior they
> > provide.
>
> John,
> I asked for a documentation pointer on this in a previous post that
> hasn't hit the server here yet, but don't bother with
Paul Kraus wrote:
> Can you define a list with my?
>
> I tried
> my ($var1, $var2) = 'something','something else';
> I have also tried
> my ($var1, $var2 = 'something','something else');
Close! You need:
my ($var1, $var2) = ('something', 'something else');
--
To unsubscribe, e-mail: [EMAI
Paul Kraus wrote:
> Can you define a list with my?
>
> I tried
> my ($var1, $var2) = 'something','something else';
> I have also tried
> my ($var1, $var2 = 'something','something else');
>
> Thanks.
>
> Paul
When you say list, then hash comes to mind. So to do a list then you need
key and dat
On Tue, 21 Jan 2003 14:17:19 -0500, "Paul Kraus" <[EMAIL PROTECTED]> wrote:
>
> Can you define a list with my?
>
> I tried
> my ($var1, $var2) = 'something','something else';
> I have also tried
> my ($var1, $var2 = 'something','something else
Greetings!
I am beginning to seriously consider what I am going to have to do to
wrestle some reasonable amount of organization out of the unbelievable
pile of spaghetti I've been trying to update. I managed to add what I
needed; now I'm going to go back and do it the way it should have been
done
R. Joseph Newton wrote:
> The die function can be very useful
> working in console mode, but it is hell for CGI debugging.
> Since errors go into the server error log, which tends to be
> accessible only to the system admin, it can be damn near
> useless to have die statements in a CGI script.
You
Does anyone have an example of determinting the file attibute bits of a
file? I can get the bits, but have no easy way of determining what's
what. I'm using the Win32::File::GetAttributes function.
-mike
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
I am creating a simple database that needs to contain 3 fields.
Date, order number, tracking number.
I figured I would use a dbmhash and use pack to get the data in.
So my hash would be %hash{tracking_number}=$packeddata.
The date and order number are both strings.
So using the information I rece
Rob Richardson wrote:
>
> Greetings!
Hello,
> I am beginning to seriously consider what I am going to have to do to
> wrestle some reasonable amount of organization out of the unbelievable
> pile of spaghetti I've been trying to update. I managed to add what I
> needed; now I'm going to go back
Paul Kraus wrote:
> I am creating a simple database that needs to contain 3 fields.
> Date, order number, tracking number.
>
> I figured I would use a dbmhash and use pack to get the data in.
> So my hash would be %hash{tracking_number}=$packeddata.
>
> The date and order number are both strings.
[EMAIL PROTECTED] wrote:
> Hi all,
>
> i have head that switch is introduced from perl 5.8. what are all the
> other new additions to the perl???
>
> enlighten me --
Hi.
Take a look at "perldelta - what is new for perl v5.8.0" here:
http://dev.perl.org/perl5/news/2002/07/18/580ann/perldelta.
dear friends:
i have a simple doubts in reguler exepration see the the passage that follows is
stored in a variable by name v. in the fifth line see the words like this "Next 20 ^ "
now i want delete all the charecter before ^- sign in my variable v.
shall i use find and replace to find all th
Justino Berrun wrote:
> #hello, is there a way to split a string between a digit and character
> #without losing the digit or the character
> #Any help would be very appreciated
>
> $string='hello...4546perl...2366Pogrammers..3435'; #e.g. would
> make three new strings
>
> @newstrings=split(/(\
You are of course correct. After some digging I seems that the problem
was in my unpack statement. When I actually checked the packed variable
all the data was there.
I was doing .. My ($a,$b) = unpack("A A",$buffer);
When I added ... Unpack "A* A*"
It sort of worked. It just unloads $buffer i
Paul Harwood wrote:
> What would be the best method to parse the following DN? I just want
> the first part of this DN so I can create a server list into an array
> (EX-MSG-01, EXMSG-02 etc). I've tried using SPLIT but I am not sure
> how to get the first part of the text I want. Any help appreciat
> dear friends:
Howdy
>
> i have a simple doubts in reguler exepration see the the
> passage that follows is stored in a variable by name v. in
> the fifth line see the words like this "Next 20 ^ " now i
> want delete all the charecter before ^- sign in my variable v.
>
> shall i use find and
I have just installed xemacs on my windows xp machine. I am working in
mode cperl-mode. From my understanding it is supposed to have syntax
highlighting. Is this untrue of the windows port? Do I need to turn it
on somewhere?
Paul Kraus
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
Paul Kraus wrote:
> You are of course correct. After some digging I seems that the problem
> was in my unpack statement. When I actually checked the packed
> variable all the data was there.
>
> I was doing .. My ($a,$b) = unpack("A A",$buffer);
> When I added ... Unpack "A* A*"
> It sort of w
Bob Showalter wrote:
> Paul Kraus wrote:
>> Can you define a list with my?
>>
>> I tried
>> my ($var1, $var2) = 'something','something else';
>> I have also tried
>> my ($var1, $var2 = 'something','something else');
>
> Close! You need:
>
>my ($var1, $var2) = ('something', 'something else');
I have two text files that are exported from our shipping computers each
night.
One is FedEx and contains a space delimitated file with two fields.
OrderNumber TrackingNumber
The other is UPS and contains a CSV file with two fields.
"OrderNumber","TrackingNumber"
I wanted to have a script that w
Rob Richardson wrote:
> Greetings!
>
> I am beginning to seriously consider what I am going to have to do to
> wrestle some reasonable amount of organization out of the unbelievable
> pile of spaghetti I've been trying to update. I managed to add what I
> needed; now I'm going to go back and do i
"...
Unlike 'my', however, it is a permanent
package variable and its value will be retained across calls to a
subroutine ..." --Rob
Hi Rob,
So does this make it equivalent to a C-style static variable?
I've been trying to test it, and it seems to be impossible to even declare it using
strict.
Michael Kingsbury wrote:
> Does anyone have an example of determinting the file attibute bits of
> a file? I can get the bits, but have no easy way of determining
> what's what. I'm using the Win32::File::GetAttributes function.
>
Hi Mike.
The bitmasks COMPRESSED, DIRECTORY, HIDDEN, NORMAL, OFF
My ($var1,$var2) = ('something','something else');
Was exactly what I wanted.
:)
-Original Message-
From: Rob Dixon [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 21, 2003 3:40 PM
To: [EMAIL PROTECTED]
Subject: Re: My list declaration
Bob Showalter wrote:
> Paul Kraus wrote:
>> Can
Paul Kraus wrote:
> I have two text files that are exported from our shipping computers
> each night.
>
> One is FedEx and contains a space delimitated file with two fields.
> OrderNumber TrackingNumber
>
> The other is UPS and contains a CSV file with two fields.
> "OrderNumber","TrackingNumber"
Thanks!
I like to make more work for myself.
-Original Message-
From: Wagner, David --- Senior Programmer Analyst --- WGO
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 21, 2003 3:56 PM
To: '[EMAIL PROTECTED]'; Wagner, David --- Senior Programmer Analyst
--- WGO; 'Perl'
Subject: RE: P
"...
Hi Paul.
n 'our' variable has the same visibility as a 'my' variable declared
in the same place, i.e. through to the end of the current lexical
scope (block or file). Unlike 'my', however, it is a permanent
package variable and its value will be retained across calls to a
subroutine (unless m
Rob Dixon wrote:
>
> Justino Berrun wrote:
> > #hello, is there a way to split a string between a digit and character
> > #without losing the digit or the character
> > #Any help would be very appreciated
> >
> > $string='hello...4546perl...2366Pogrammers..3435'; #e.g. would
> > make three new
R. Joseph Newton wrote:
> "...
> Unlike 'my', however, it is a permanent
> package variable and its value will be retained across calls to a
> subroutine ..." --Rob
>
> Hi Rob,
>
> So does this make it equivalent to a C-style static variable?
Sort of, but beware that any occurrence of 'our $var'
On Tue, 21 Jan 2003 15:59:12 -0500, "Paul Kraus" <[EMAIL PROTECTED]> wrote:
> Thanks!
>
> I like to make more work for myself.
In that case you could always just create your hash/array data structure and then use
Storable and Freezethaw :-)
Hi,
does anybody know the maximum value of floating point numbers I could use
in Perl?
Konrad
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
What I'm trying to achieve is the following:
I have an ASCII text file (zonelist.input) for input which contains a domainname (that
is i.e. foo.com) on each line ( a total of about 230 lines are in this file).
Furthermore, I have 3 other text files.
I'm looking for a method to read each line from
Bob Showalter wrote:
> Paul Kraus wrote:
>> Maybe I am misunderstanding but that seems to be the exact same thing
>> my does.
>
> No. my() creates a new variable. our() refers to a global variable.
not sure what you mean by that. 'our' does create new variable if that
variable does NOT already
How can I search for form feed. I have tried
/\f/
But I realize that the regexp engine doesn't use \f
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Paul Kraus wrote:
> How can I search for form feed. I have tried
>
> /\f/
>
> But I realize that the regexp engine doesn't use \f
But it does! page 72, Mastering Regular Expressions, Friedl.
Usually maps to ASCII character, 014 octal.
Wags ;)
*
david wrote:
> Bob Showalter wrote:
>
> > Paul Kraus wrote:
> > > Maybe I am misunderstanding but that seems to be the exact same
> > > thing my does.
> >
> > No. my() creates a new variable. our() refers to a global variable.
>
> not sure what you mean by that. 'our' does create new variable if
Bob Showalter wrote:
> I think you're missing the point. Any reference to the symbol anywhere in
> the program "creates" the variable, in the sense you indicated here.
>
> For example:
>
>package Foo;
>our $x = 1;
>print "$_\n" for keys %Foo::;
>our $y = 1;
>
> This prints:
>
Konrad Foerstner wrote:
Hi,
does anybody know the maximum value of floating point numbers I could use
in Perl?
This is likely either system architecture (aka 32 bit vs. 64 bit) and/or
memory size dependent. And then there is the whole signed vs. unsigned
thing, but all of that just makes my
Angerstein wrote:
...already searched cpan.
Has anybody an idea where I can get the Modul or Methode IO::Getline or
IO::Getlines
Are they only in Perl 5.8?
(I am using 5.0)
This appears to be a method(s) included as part of the IO::Handle
module, which I believe became available around 5.6
On Tue, 21 Jan 2003 14:17:19 +, Paul Kraus wrote:
> Can you define a list with my?
>
> I tried
> my ($var1, $var2) = 'something','something else';
> I have also tried
> my ($var1, $var2 = 'something','something else');
Of course, but it like with mathematics.
If at the left side of a = is
> if ($result eq $file1)
This is checking to see if each line matches the filename itself, not the
contents of file1. You were going for the contents of $file1, correct?
Here's my stab. Read in the target files first, then match.
When it walks through the source file, it will print out the name
How do I use a (known) Bareword constant from a package when strict's on?
-mike
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
> -Original Message-
> From: Michael Kingsbury [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 22, 2003 12:28 PM
> To: [EMAIL PROTECTED]
> Subject: Bareword Constant from Package giving problems with use
> strict
>
>
> How do I use a (known) Bareword constant from a package wh
not sure what you mean...
but perhaps the following might help:
* use constant ABC => 'this is some text';
* use vars ...
On Wed, 2003-01-22 at 12:28, Michael Kingsbury wrote:
> How do I use a (known) Bareword constant from a package when strict's on?
>
> -mike
--
To unsubscribe, e-mai
The Win32::File uses ARCHIVE, READONLY, SYSTEM, HIDDEN, etc as constants
for use with the file attribute types. However, with use strict, perl
barfs due to a bareword.
On 22 Jan 2003, simran wrote:
> not sure what you mean...
>
> but perhaps the following might help:
>
> * use constant
Michael Kingsbury wrote:
> The Win32::File uses ARCHIVE, READONLY, SYSTEM, HIDDEN, etc as constants
> for use with the file attribute types. However, with use strict, perl
> barfs due to a bareword.
>
they should be used the same way vars, subs are used. if they are exported,
just use them. if
1 - 100 of 120 matches
Mail list logo