Harry Putnam wrote:
I want to get a daily list of all the directories under a kind of
large (by home standards) news heirarchy.
I know a little about using File::Find but wonder if there is a better
way.
Here are the things one runs into with File::Find.
if you run it looking for type d (-d) direct
Teng Wang wrote:
I wanna match a specific pattern using grep().
My pattern has two parts:
1. exclude "." or ".." (to exclude the current and parent
directory in unix)
2. the file type is jpg.
The first pattern I am using is !/^\.\.?$/
The second is /\.jpg$/i
How to combine them together? using t
"Siegfried Heintze" <[EMAIL PROTECTED]> writes:
> This, works, but it sure is ugly. Is there not an easier way to do this with
> perl?
>
> perl -e'@ARGV = ("-") unless @ARGV; while(@ARGV){ $ARGV= shift @ARGV;
> if(!open(ARGV, $ARGV)){ warn "Cannot open $ARGV: $!\n"; next;} while
> (){ print "$ARGV
"Michael Seele" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> hi,
> i'm new to perl and i want to know if perl has reflection like java?
> how can i acces reflection and how powerfull is the reflection in perl?
> thx mseele
>
Perls reflection support is probably my most favorite th
I wanna match a specific pattern using grep().
My pattern has two parts:
1. exclude "." or ".." (to exclude the current and parent
directory in unix)
2. the file type is jpg.
The first pattern I am using is !/^\.\.?$/
The second is /\.jpg$/i
How to combine them together? using two greps or a s
Perl works better than grep because the grep statement you give below does
not find any instances of the pattern and perl finds quite a few. I'm using
Cygwin on Win2003Server. Since there is something obviously wrong with my
cygwin implementation of grep, how do I get the file names with perl?
Thi
"Siegfried Heintze" <[EMAIL PROTECTED]> writes:
> This works better than grep, except for the fact it does not print the file
> name. How can I make perl print the file file name?
How is it better than grep?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL P
"Siegfried Heintze" <[EMAIL PROTECTED]> writes:
> My man pages and info pages are not working well and I cannot figure out how
> to make grep search for a certain pattern. I even tried egrep and fgrep. So
> how do I reinvent grep with perl? Here is my attempt:
>
>
>
> perl -n -e 'print "$. $_" i
I want to get a daily list of all the directories under a kind of
large (by home standards) news heirarchy.
I know a little about using File::Find but wonder if there is a better
way.
Here are the things one runs into with File::Find.
if you run it looking for type d (-d) directories it still ta
Siegfried Heintze wrote:
Andrew,
Thanks. When I hit "n" to go to the next page, it says "No previous
regular expression (press RETURN)". So I can only display the first page. I
have it expanded to the full screen but I still cannot see the portion of
the display that tells me how to use extended
Siegfried Heintze wrote:
My man pages and info pages are not working well and I cannot figure out how
to make grep search for a certain pattern. I even tried egrep and fgrep. So
how do I reinvent grep with perl? Here is my attempt:
There's no need. When you do 'man whatever', you can hit '/', type
My man pages and info pages are not working well and I cannot figure out how
to make grep search for a certain pattern. I even tried egrep and fgrep. So
how do I reinvent grep with perl? Here is my attempt:
perl -n -e 'print "$. $_" if /^ *END *$/' *.f
This works better than grep, except fo
Steve Bertrand wrote:
> I'm trying very hard to get a good grasp on OOP, references, complex
> data structures etc.
>
> I just ordered Learning Perl Objects, References and Modules from
> amazon.ca, and have been tredging through the perldoc documentation.
>
> After getting into a few of the page
> Steve Bertrand wrote:
>> I'm trying very hard to get a good grasp on OOP, references, complex
>> data structures etc.
>>
>> I just ordered Learning Perl Objects, References and Modules from
>> amazon.ca, and have been tredging through the perldoc documentation.
>>
>> After getting into a few of t
Steve Bertrand wrote:
I'm trying very hard to get a good grasp on OOP, references, complex
data structures etc.
I just ordered Learning Perl Objects, References and Modules from
amazon.ca, and have been tredging through the perldoc documentation.
After getting into a few of the pages, it appears as
I'm trying very hard to get a good grasp on OOP, references, complex
data structures etc.
I just ordered Learning Perl Objects, References and Modules from
amazon.ca, and have been tredging through the perldoc documentation.
After getting into a few of the pages, it appears as though I get a
cert
West, William M wrote:
oddly- the grep documentation in perldoc doesn't even mention
filehandles. readdir does show proper use though-
readdir does not use a filehandle and therefore does not show the proper use
of them. The opendir/readdir/rewinddir/seekdir/telldir/closedir functions all
use d
West, William M wrote:
my @array =grep {-d "$directory\/$_"} readdir ;
gives me this error::
Type of arg 1 to readdir must be HANDLE (not ) at ./subdirs.pl
line 30, near ";"
Execution of ./subdirs.pl aborted due to compilation errors.
The expression "readdir ;" is the same as "readdir readline LS2;
> "Bee" == Bee <[EMAIL PROTECTED]> writes:
Bee> use test::Foo;
Please name your packages with an initial cap. Lowercase
are reserved for pragmas.
Bee> return bless $self;
You're still needlessly avoiding the two-arg bless, which means your
constructors cannot be inherited.
Bee> PS. I
> "William" == William Ampeh <[EMAIL PROTECTED]> writes:
William> Can anyone recommend a Tcl/Tk training in DC/MD/VA?
Why did you ask about *Tcl/Tk*, on a *Perl* list? Most people
using Perl are using Perl/Tk, or Perl/Gtk, etc.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc.
> "Nicolay" == Nicolay A Vasiliev <[EMAIL PROTECTED]> writes:
Nicolay> Hallo, Chris!
Nicolay> Oh, in this library "getstore" is more matching I suppose.
In fact, "mirror" is even better, if it's an image that changes
on a regular basis and you want a local copy.
--
Randal L. Schwartz - Ston
21 matches
Mail list logo