variable-length strings

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hello from the land of enchantment,

I begin a crosspost herewith that I hope to make relevant to the
newsgroups listed. It will take some time to get to there from here, but
the ambition is to make it relatively lean with the topicality of each
ng addressed and respected.  I am OP; if that's a problem for you, I'd
like you to move on graciously.

It begins with perl, which I am currently reading.  So that's gonna be
q1). There will be more questions in the same format, and I would like
to make you aware of that as you consider an editorial choice.  OP
suggests editorial choices that derive from the questions, that is, are
trimmed with respect to q.

$ pwd
$ perl
$ cat
#!/usr/bin/perl -w
use Net::FTP;
my $domain = '';
my $username = 'u61210220';
my $password = '';
my $file = 'jac1.avi';

$ftp = Net::FTP->new($domain)    or die "Can't connect: $@\n";
$ftp->login($username, $password)       or die "Couldn't login\n";

$ftp->cwd('/wsb6326330301/resources/') or die "death $@\n";
$ftp->put($file) or die "put failed ", $ftp->message;


q1)  Why did I die?

I had a very successful day.  I could show it, except that I'm unable to
communicate well with the internet.  This is usually the case when I try
to extend my ubuntu capability.  I have something that hangs that
wouldn't under a more firmly-established identity.

q2) [I imagine that I have a distinct question for each listed ng]  In
testing, I've noticed a difference in file sizes between what I upload
with ftp and what I download.  The files are 60 megs, conceived by
apple, and I can't show what I'm saying until I get ftp working.

There's no way I can look at these files with a hex editor and my eyes.
  Doesn't unix have a built-in way to compare them?


a)  Is there some newsgroup out there that considers web design, and not
the kind where you have to give them money for their opinion.  If I paid
$40 for usenet advice, it might be worse than what a hooker on central
might do; it's given by people who want to make $40 on usenet.

alt.web.css.embedded.object.rus ?

q4)  and then the good people of c.l.c.  It looks like your tone has
come a long way.  Down the road I'd like to consider how to pass
information which is perl input to fortran output using the iso c binding.


Re: variable-length strings

try to change the connection line to

$ftp = Net::FTP->new($domain, Debug=>1, Passive=>1)

Re: variable-length strings

Quoted text here. Click to load it

The simplest place to start is with your command line ftp program. If
you can connect and transfer files with your command line ftp, then IN
THEORY you should be able to put the same series of commands in a
batch file (i.e., a Perl script) and run them. If you can do that,
then you have all the functionality you neet./

Quoted text here. Click to load it

On Unix/Linux, use diff. If you are comfortable with vi/vim, it also
has a diff capability.

Quoted text here. Click to load it

Sorry, but you need to rephrase your question, as this does not make
sense to me.

Quoted text here. Click to load it

Data is data. You can use Perl to manipulate and format data. In fact,
PERL (in the opinion of some, anyway) stands for Practical Extraction
and Reporting Language.


Re: variable-length strings

On 06/01/2011 08:13 AM, ccc31807 wrote:
Quoted text here. Click to load it

I needed a fresh day and fresh eyes, and t set Debug=> 2 to see that the
wsb "web site builder" number was wrong.  That's a separate directory
that my host uses for when they build the website.  I want to adios this
thing, so I called them, and they have you change an administrative
setting so that a browser will be directed to the index.html in the root
menu as opposed to in the wsb folder.

So now this /wsb.../ thing is a relic for me to play with and destroy.
Why didn't this work:

[sorry can only paste as quotation:]

Quoted text here. Click to load it


it just keeps on telling me Directory not empty
Quoted text here. Click to load it

Cpan says that RECURSE has to be true, and I thought a good guess for
"true" in a syntax that is a child of C would be one.

Quoted text here. Click to load it

Thx, ccc, I'll do that.  Here's what's vexing me right now.

The only difference between these files, is that the smaller one went on
a round on the internet.  It was sent up like this:

Quoted text here. Click to load it

And downloaded using google chrome.  Is this typical, because if my
experience is, then I don't really see how any large file gets
transferred faithfully.

Gotta go pull down some legal tender.  Adios.

Re: variable-length strings

["Followup-To:" header set to comp.lang.perl.misc.]
Quoted text here. Click to load it

Simple answer: Because you couldn't change the current working directory
to '/wsb6326330301/resources/'.

As to why that didn't work, the Net::FTP module would tell you if you
asked it. Read the synopsis of perldoc Net::FTP for a few examples on
printing proper error messages.


Re: variable-length strings

["Followup-To:" header set to]
Quoted text here. Click to load it

There's cmp, but it only shows you where the first difference is.

There's diff, but it is intended for text files.

You could convert both files with od or hd and diff those. But that
doesn't work well.

I think Emacs has a binary-diff mode, but I'm from the vi fraction.

So, back in the mid 1990's I wrote bdiff (binary diff): /

I guess I should dust it off, write a man-page and try to get it added
to some linux distribution. But I very rarely need it myself.


Site Timeline