实现脚本

use strict ;

my $fileName = "/Users/chenfool/Desktop/sequoiadb-大数据平台构建.pdf" ;

my $outFile = "/Users/chenfool/Desktop/chentest.pdf" ;

my $buff ;

open (IN, $fileName) ;

open (OUT, ">$outFile") ;

binmode (IN) ;

binmode (OUT) ;

read (IN, $buff, ) ;

#print $buff . "\n" ;
print OUT $buff ; close (IN) ; close (OUT) ;

这里并没有用到 pack 和 unpack

perl 打开二进制文件,并拷贝内容的更多相关文章

  1. 分享:Perl打开与读取文件的方法

    在Perl中可以用open或者sysopen函数来打开文件进行操作,这两个函数都需要通过一个文件句柄(即文件指针)来对文件进行读写定位等操作. Perl打开与读取文件的方法,供大家学习参考.本文转自: ...

  2. [原]AngularJS iframe打开不同域的内容时报错误

    <iframe id="myFrame" ng-src="{{url}}" width="100%" height="100 ...

  3. perl命令批量替换文件内容

    转自:http://www.jbxue.com/article/12638.html 使用perl命令批量替换文件内容. 对linux下的文件内容进行替换,有时不用编写perl脚本,用perl命令就可 ...

  4. VBA实现打开Excel文件读取内容拷贝Format且加超链接

    '-------------------一覧取得----------------------------- Sub getRedmineGrid_Click() Dim wb As Workbook ...

  5. [GO]二进制文件的拷贝

    writestring的方式只适用于字符串的写入,对于十进制文件的写入只要使用write就可以了 package main import ( "os" "fmt" ...

  6. perl打开本地/服务器图片

    index.html <html> <body> <h2> perl read img </h2> <img src = "displa ...

  7. perl打开读取文件(open)

    在Perl中可以用open或者sysopen函数来打开文件进行操作,这两个函数都需要通过一个文件句柄(即文件指针)来对文件进行读写定位等操作.下面以open函数为例:1:读:open(文件句柄,&qu ...

  8. Windows7下CHM电子书打开不能正常显示内容

    Author:KillerLegend Date:2014.1.28 Welcome to my blog:http://www.cnblogs.com/killerlegend/ 今日下载一个CHM ...

  9. perl 打开和关闭文件

    #!/usr/bin/perl -w use strict; #print "please input a string\n"; #my $line = <STDIN> ...

随机推荐

  1. cenos 6.5 安装apache 2.4.28出现种问题

    编译出错 configure: error: APR-util not found. Please read the documentation 解决办法 wget http://apache.fre ...

  2. Win10更新后,IE和Edge以外的浏览器打开网页速度慢的解决方案

    下载修复工具,提取码:you0 以管理员身份运行修复工具,点击“修复” 点击“确定” 提示“修复成功” 参考链接:Win10下极速模式无法打开网页的解决办法_360社区

  3. linux环境下安装的activemq的输出日志

    activemq输出日志的位置: activemq/data/activemq.log 查看activemq.log文件即可.

  4. 用css3技术给网站加分

    自己写了几个小DEMO,请打开http://codepen.io/shenggen/

  5. ssh服务配置文件---sshd_config详解

     关于 SSH Server 的整体设定,包含使用的 port 啦,以及使用的密码演算方式 Port 22 # SSH 预设使用 22 这个 port,您也可以使用多的 port !  # 亦即重复使 ...

  6. 关于node.js的安装与删除

    安装node.js 先切换到root用户安装 openssl-devel su - yum install openssl-devel 下载源代码自己编译以下代码中的tar.gz包根据node.js官 ...

  7. ubuntu动态加载模块简单模板

    1:简单代码 #include<linux/init.h> #include<linux/module.h> MODULE_LICENSE("GPL"); ...

  8. C++引用详解【转】

    本文转载自:http://www.cnblogs.com/gw811/archive/2012/10/20/2732687.html 引用:就是某一变量(目标)的一个别名,对引用的操作与对变量直接操作 ...

  9. Codeforces Beta Round #88 C. Cycle —— DFS(找环)

    题目链接:http://codeforces.com/problemset/problem/117/C C. Cycle time limit per test 2.5 seconds memory ...

  10. linux系统配置之网络配置(centos)

    CentOS---网络配置详解 一.配置文件详解在RHEL或者CentOS等Redhat系的Linux系统里,跟网络有关的主要设置文件如下: /etc/host.conf         配置域名服务 ...