I agree with you Ron
At 07:05 AM 10/1/2011, Ron Weidner wrote:
I've had mixed feelings about my
experience on this list so far. I'm sharing these opinions because I
feel it would be awesome if this list seemed friendlier to beginners.
Several years ago I subscribed to this
list and
Hello
It has been a while since I have done some serious Perl programming. I am
looking for a basic script that will take a very large file and split it up
into a manageeable files that can be emailed and then a script that will merge
the files back. Has anyone created such a script. I have a
Hello
I am not an expert in perl and so before I propose that a particular script be
written I would likek to get an idea as to how hard the task would be.
We have a large number (in my opinion) of excel spreadsheets that need to be
concerted to jpeg format. The jpeg files are used when a
Hello
I have written a perl script and I am in the debugging and imroving
the code. The first improvement is want to make is to replace the
system(Dir c:/s) call because it is not portable. So I was told to
use the File package. I have not found a good example. So I am
looking for some
Hello
I think we are loosing track of what I want to do.
I want to stay out of the dir code approach.
I want to find all the files on a drive (C, D...) and put them into
an array. I would like access to the file size of the files so if I
find 2 files with the same name I want to compare the
Hello
I would like to apologize for creating a lot of confusion. I have
most of my perl program working. I ran into an issue and Charles made
a suggestion to change my code from a PC based dir command to a
File:File call to find all the files. I am doing this to make the
code more portable
Hello
I looked at the documentation for this function and I find it
confusing. What do you pass in to get all the files on drive letter c?
Andrew
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
file found.
Andrew
At 04:13 PM 5/18/2009, Chas. Owens wrote:
On Mon, May 18, 2009 at 19:05, Gunnar Hjalmarsson nore...@gunnar.cc wrote:
AndrewMcHorney wrote:
I looked at the documentation for this function and I find it confusing.
Try File::Finder for a less confusing interface
Hello
I put the strict and warning statements in my perl code. I now need
to initialize arrays. What is the best way to initialize an array
before the loop where I will basically recreating the array size in the loop?
my @array = ?
while (more work to do)
{
@array = split $string;
# do
Hi
I appreciate the assistance from a previous email message on writing
functions in Perl. The issue right now is that I am passing an array,
a number and a string to the function but it does not appear to be
passed successfully. I am sure the error is quite simple. The
function in question
Hello
I need a little assistance in creating a function for my perl code.
The function will pass in an array of strings and an index. The
function will build a single string using the 1st string at the
passed in index and the remaining strings in the array. It will
return the newly built in
Hello
I have not had a lot of experience with writing functions in perl. However I am
working on a pretty good size script that could reduce the code size by writing
a function that would pass in 2 arrays, a file handle and a string. The
function only uses the strings for outputting to the
Hello
I have a perl script that is working fine. The script involves creating an
array of numbers. The values of these numbers in the is quite large (12 integer
digits or more). I can easily display the numbers with a simple print
statement. I want to display the contents with one element per
Hello
I am working on a perl script that will go through a directory and
it's subdirectories and purge all the files that are more than a
specified number of days old. I am using a Unix system so I do a find
command to gather up the files I want. I then am going to do a stat
command to find
Hello
Is there a way in Perl to find out why a file failed to open? I am
working on a script that is opening and reading a lot of files. This
script is right now being written on a Windows based system.
Andrew
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
Hello
I am continuing work on my script. I know there are many ways to read
files. I am going to be opening files that are text and also that are binary.
Here are my 2 ways that I have done it it in the past. I am wondering
which way is best.
$_ = join '',(SOURCE_FILE) or @SourceLine =
The colon was the problem
At 02:18 PM 10/26/2008, Mr. Shawn H. Corey wrote:
On Sun, 2008-10-26 at 14:10 -0700, AndrewMcHorney wrote:
Hello
I have some perl code that was working and for the life of me I
cannot determine why it is is failing now. All I am trying to do is
to create and open
Hello
I am working on a script that does a directory of a Windows drive.
There are some lines returned where there are spaces before the 1st
character. This throws off the splitting of the line into an array.
How can I strip the leading characters in an efficient way into
either the same
, AndrewMcHorney wrote:
Hello
I am working on a script that does a directory of a Windows drive.
There are some lines returned where there are spaces before the 1st
character. This throws off the splitting of the line into an array.
How can I strip the leading characters in an efficient way
Hello
I have a line of code that appears to not be returning what I am
looking for. I am attemting to add a number which has commas in it.
It represents the number of bytes of a file obtained for the dir
command. At the end of the run the number of bytes does not come
close to what I expect.
Hello
I am working on a perl script which is strictly loops for performance
testing. For some reason the index for the quarterback index is not
incrementing. Also sometimes I am getting an error message about the
last right bracket. I have looked at this for a while and cannot see
why this
Hello
I am looking for sample code where a user would enter a password. The key here
is to either replace the characters entered with blanks or something like *
for each character that is entered. I am sure this has been done before.
Thanks,
Andrew
--
To unsubscribe, e-mail: [EMAIL
Hello
I need to write some code where I invoke ftp to another node and ftp a file
from its directory to a directory that is on my system. Can this be done in
perl (I suspect so) and what would be the best way to do it. This will help
automate some backup work that needs to be done.
Thanks,
Hello
I am sure the answer to this question is very simple. I have a number value
which I am inserting into a string I am building. How can I append the number
into the string so that it will always be 2 characters in length? In other
words if the month is 9, how can I make it appear as 09?
Hello
Is it possible to write a script that will tell me whether a file has
certain properties. I am using a commercial program for backing up
software. Each file has an associated property that indicates whether
it is to be backed up or whether it is backed up or nothing at all. I
would
Hello
I am trying to read a text file with carriage returns and line feeds on a unix
system and for some reason it will read only one of text. I use the same code
in a different perl script and I can read a file that does not have carriage
returns and line feeds.
The existing code is :
open
Hello
I have been reading files with the following command:
@source_lines = (SOURCE_FILE);
This has worked until I started reading some very large files. Is
there a better way to read files? The files I am trying to read now
are about 300 megabytes in size. The bad news is that the spec has
Hello
The spec does not allow for carriage returns or line feeds making it
a long line. Is there a way to read x number of bytes?
Andrew
At 11:10 AM 5/25/2008, Rob Dixon wrote:
Hi Andrew
(If you are asking a new question of this group please make a fresh
post with an
appropriate subject
Hello
I have a string that I am trying to parse out into separate variables. I am
having problems getting the first field extracted. I want to extract fields
using period (.) and underline (_) delimineters.
Here is the string
aaa_b_c_.ddd
The string is contained in $_.
Here is my code
Hello
i am looking for perl documenation that would aid in the determining what code
to write and how to determine how one made a syntax error and also available
functions.
I need the documentation 2 formats. The first would be something that can be
retrieved online for when I am online ( a
How does one gunzip on a windows pc?
At 13:16 2007-12-18, Ankur Gupta wrote:
On Dec 19, 2007 2:40 AM, [EMAIL PROTECTED] wrote:
Hello
i am looking for perl documenation that would aid in the
determining what code to write and how to determine how one made a
syntax error and also available
Hello
I have a string that I would like to append a \ onto the end of the
string. I tried doing a $string_name.\n but it is not doing anything.
Thanks,
Andrew
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Hello
I am looking for a perl function or functions that will give me the
date and time. I am going to use the results to create a unique file name.
Andrew
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Hello
Can someone the reasoning why it is technically correct that when
extracting a scalar item from an array that one must use
$array_name[$index] instead of @array_name[$index] ? To me, the
logical way is to use the array name with the symbol of array. It is
my understanding that using
Hello
I am trying to build a string that contains the following text dir
c:\ /S so I can get a complete directory of all the files on drive C
and put them into an array with the following line of code -
@dir_list = 'dir c:\ /S`;
Right now I have the following working:
However, it is now
Hello
I am getting a strange error where I am trying to split a string into
an array. The string is a line obtained from doing a directory of a
disk. The error message is:
Reference to nonexistent group in regex; marked by -- HERE in m/
Directory of C
:\Documents and
Hello
I now got my directory listing into an array of strings. I would like
to now split up the string into a an array of strings from the
original string. For example, I might have a string of a b c d
and I now want a 4 element array containing a, b, c, 'd.
I did the following but it did
:57,1,712,128,GdiPlus.dll as
the elements of the array.
Thanks,
Andrew
At 17:40 2007-11-17, Tom Phoenix wrote:
On 11/16/07, AndrewMcHorney [EMAIL PROTECTED] wrote:
I now got my directory listing into an array of strings. I would like
to now split up the string into a an array of strings from
Hello
Here is the contents of the string I want to create:
dir c: \ /S so I can get a complete list of all the files in a disk
partition. How can I create this string?
Andrew
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hello
I am working on a perl script in which I want a complete directory
listing of a drive partition. How can this be done in Perl?
Right now my code reads :
@file_list = `cd c:\;dir c:/s`;
However I am getting the following error message:
Extracting files in directoryThe filename,
Hello
I am working with strings and I have the following 2 questions.
1. How does one determine the length of a string?
2. How does one extract an individual character of a string?
Andrew
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hello
I have a string that contains a full path and file name. What is the easiest
way to extract the file name? For example the path is /dir1/dir2/dir3/file.txt.
Andrew
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Hello
I appreciate the response to the last question. I have scripts that I have
opened files and they work. However, I am failing on opens now because the file
is read only. What is the way to open a file read only.
Andrew
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
Hello
I am not an advanced perl programmer and I do not have my books with me. I want
to determine if a string is within a string and to not process the string if
the string is found. Could someone please provide a simple sample.
Thanks,
Andrew
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
Hello
I am looking for some simple perl functions that will return the current date
and time in string format. The purpose is to create a file with part of the
name being the date and time.
Thanks,
Andrew
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Hello
I am looking for some simple perl functions that will return the current date
and time in string format. The purpose is to create a file with part of the
name being the date and time.
Thanks,
Andrew
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Hello
I do not have my perl books with me and so I cannot diagnose the
error I am getting with several if statements. Could someone assist?
Here is the code:
#! /bin/perl
#
# Create the files to delete list file
#
#
# Find all the files
#
print Extracting files in directory;
@file_list =
Hello
Is there a downloadable manual for perl? I would like to download the manual
onto my laptop before I go on vacation. I really want to avoid bringing extra
books.
Andrew
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hello
I am wondering how the chomp function works. I am looking to see how
I can truncate new line and/or carriage returns from a string. Will
chomp do nothing if there are no carriage return or line feed at the
end. If the end of the string has a space will it leave it alone?
Andrew
--
Hello
I am working on a perl script and the 1st step is to get a list of all the
files on the C drive. I am getting an error message - Can't stat c:*.*: No such
file or directory
Here is my perl script:
use strict;
use warnings;
use File::Find;
$| = 1; #Autoflush STDOUT
#finddepth comes
Hello
I got the file command to work but it is not as complete as I would have hoped
for. I was hoping to get the file size and directory of the file so I could put
them into arrays. Is there a way I can do it with the find command?
Andrew
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
Hello:
I got some advice on how to obtain a listing of all the files on a hard drive.
The advice was to use File::find. I looked at the perl document and I am a
little confused and so a simple example would be nice. I would like to get the
file name, directory path, size and date of last
Hello
I would like to execute a dir */s command in windows and save the output into
an array. I know I can do this in perl by doing executing the following command
in a perl script:
@allfiles = `find / -print`;
How can do this in windows:
Thanks,
Andrew
--
To unsubscribe, e-mail: [EMAIL
Hello
I am about to download the active perl software and I noticed that there are 2
formats. There is the AS package and the MSI package. What are the differences
and which one is better? Also how does one install this program as I downloaded
the AS package and did not see a setup program in
Hello
I learned Perl on a Unix System and I would like to use perl on a PC. Do I need
to install active perl? What are the steps to running perl on a PC?
Thanks,
Andrew
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Hello All:
I have taken a little classroom work in perl. I believe it is very possible
to write a perl script to read a text file, strip the carriage return and
linefeed and write it to another file.
How would the script look?
Thanks,
Andrew
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
I am starting a perl programming class next Tuesday. I know perl runs under
unix. I would like to do some of the homework on windows. What do I need to
download and install to execute perl programs under windows 98. I am
looking for something for free, not a disk hog, easy to install and use.
57 matches
Mail list logo