Vahid wrote:
> Hi all,
> I have the following code to sort UNIX's password file, it works fine
> but can only display on stdout. How can I make it write the output to
> a file?
> Thanks,
>
> #!/bin/perl -w
> #
> use strict;
> open(myFILE, '|-','awk','-F:','s[$1]++==0' ) or die $!;
> open(passwdFH,
Support wrote:
> Hi all
> I have a little bit of code you may be able to help with.
> I load a file into an array with
>
> foreach $lines(@database_array) {
>@edit_array = split(/\:/,$lines);
>push(@member_array,[EMAIL PROTECTED]);
>$x++;
> } #loop
>
> and then play around with the a
Support wrote:
>
> Hi all
Hello,
> I have a little bit of code you may be able to help with. I load a
> file into an array with
>
> foreach $lines(@database_array) {
You should limit the scope of $lines to the foreach loop. Does $lines
contain multiple lines or just one line? Perhaps you sho
On Feb 2, Support said:
>foreach $lines(@database_array) {
> @edit_array = split(/\:/,$lines);
> push(@member_array,[EMAIL PROTECTED]);
> $x++;
>} #loop
First, it doesn't look like you're using 'strict', which means you're not
declaring your variables. This is probably going to lead to trou
> but I can not retrieve the data into $newline with join. Is this bit wrong
Yes, it is a little off.
> $member_array[$count]
This *isn't* an array, it is an *array reference*
> [EMAIL PROTECTED]
Same with this.
Join takes a list of scalars, not a list of references. So you need to
dereferen
I stand corrected.. It should be ">" not ">>"..
Should stop reading the list late at night..
Thanks
On Tue, 22 Jul 2003 [EMAIL PROTECTED] wrote:
>
> On Mon, 21 Jul 2003 21:55:03 -0600 (MDT), [EMAIL PROTECTED] wrote:
>
> > open the file with ">>
On Mon, 21 Jul 2003 21:55:03 -0600 (MDT), [EMAIL PROTECTED] wrote:
> open the file with ">>"
> This will cause an overwrite..
>
Actually that is an "append". Maybe there is a definition issue, aka I would think of
an "overwrite" to be a ">" where
open the file with ">>"
This will cause an overwrite..
On Mon, 21 Jul 2003, awarsd wrote:
> Hi,
>
> I'm curious to know if it is possible to write to file with overwritting
> information without putting into an array
> if i have in a file
> a
> b
> c
> d
> e
> and i want to add g-r-t-u-x i wou
awarsd <[EMAIL PROTECTED]> wrote:
:
: I'm curious to know if it is possible to write
: to file with overwritting information without
: putting into an array if i have in a file
:
: a
: b
: c
: d
: e
: and i want to add g-r-t-u-x i would get
: now in the file
:
: g
: r
: t
: u
: x
: e <-- stays the
On Thu, Aug 09, 2001 at 06:53:15PM -0500, CDitty wrote:
> The email.txt file is an empty file and has the correct permissions.
You're reading from a file, expecting data to be there, but the file
is empty. Could this be your problem?
> # This section needs to cycle through the emails.txt file
10 matches
Mail list logo